confidential-assets-demo
confidential-assets-demo copied to clipboard
Replacing `generate` with `generatetoaddress`
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:
https://github.com/ElementsProject/confidential-assets-demo/blob/bd23dc90b62572f7c4c24f11c7505f646fd1a365/src/fred/main.go#L43
How do I pass a valid address as extra argument to the call?
@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.