Replacing `generate` with `generatetoaddress`
RdeWilde opened this issue · comments
R. de Wilde commented
Now that generate
is deprecated, I would like to replace it with generatetoaddress
but I am not sure how to get the address to pass along in the code below:
confidential-assets-demo/src/fred/main.go
Line 43 in bd23dc9
How do I pass a valid address as extra argument to the call?
Akio Nakamura commented
@RdeWilde Passing an address to generatetoaddress
, just add the 4th param like follows:
addr, _ := rpcClient.GetNewAddr(false)
res, err = rpcClient.RequestAndUnmarshalResult(&hashs, "generatetoaddress", 1, addr)
But, It seems some other codes should be fix to run with the latest version of elements.
I will try to make a PR to fix them.