Description
When testing with decred/dcrd#2705, I noticed that sendrawtransaction
is not returning errors to the caller. To reproduce, use the Simulation network harness in dcrd with the aforementioned PR applied (assuming it hasn't already been merged to master by the time these steps are followed).
From the wallet1
tmux pane:
$ ./xfer
<transaction hash> <-- Take note of this hash
Now, switch to the dcrd1
pane, regenerate the template to ensure that tx in included, mine a new block, and attempt to send the transaction above again:
$ ./ctl regentemplate
$ ./mine
$ ./ctl getrawtransaction <transaction hash from above> | ./ctl sendrawtransaction -
-40: rejected transaction <transaction hash from above>: transaction already exists
Now, switch back to the wallet1
pane and try to send the transaction again through wallet and notice it returns the hash as if it was successful:
$ ./ctl getrawtransaction <transaction hash from above> | ./ctl sendrawtransaction -
<transaction hash from above>
However, in the wallet log:
[WRN] WLLT: Refusing to add unmined transaction "transaction hash from above" since same transaction already exists mined