decred / atomicswap

On-chain atomic swaps for Decred and other cryptocurrencies.
https://blog.decred.org/2017/09/20/On-Chain-Atomic-Swaps/
ISC License
509 stars 231 forks source link

'fundrawtransaction' - use a legacy change address #106

Closed devwarrior-cool closed 5 years ago

devwarrior-cool commented 5 years ago

"Bad change output when calling litecoin 'fundrawtransaction' rpc"

Explanation: Decred atomic swaps is using "legacy" litecoin addresses but the default is not "legacy" for change outputs unless set with litecoind ... -addresstype / -changetype. If not then the changetype for the call to RPC "fundrawtransaction" should be explicitly set.

litecoind:

Wallet options:

-addresstype What type of addresses to use ("legacy", "p2sh-segwit", or "bech32", default: "p2sh-segwit")

-changetype What type of change to use ("legacy", "p2sh-segwit", or "bech32"). Default is same as -addresstype, except when -addresstype=p2sh-segwit a native segwit output is used when sending to a native segwit address)