Skip to content

client/asset/dcr: use rawrequest for signrawtransaction to get Errors#590

Merged
chappjc merged 3 commits into
decred:masterfrom
chappjc:rpcclient-signrawtransaction-debuglog
Aug 17, 2020
Merged

client/asset/dcr: use rawrequest for signrawtransaction to get Errors#590
chappjc merged 3 commits into
decred:masterfrom
chappjc:rpcclient-signrawtransaction-debuglog

Conversation

@chappjc
Copy link
Copy Markdown
Member

@chappjc chappjc commented Aug 7, 2020

This uses RawRequest for signrawtransaction, which allows inspecting the walletjson.SignRawTransactionResult.Errors field, which rpcclient drops.
The signTx function now retries 3 times with a 1/4 second delay between tries.

@chappjc chappjc marked this pull request as draft August 7, 2020 15:44
@chappjc chappjc force-pushed the rpcclient-signrawtransaction-debuglog branch from f08d940 to c3c4a7d Compare August 7, 2020 18:54
@itswisdomagain
Copy link
Copy Markdown
Member

I'm testing this with #589, will report with details if I encounter any more sign tx errors.

@chappjc chappjc force-pushed the rpcclient-signrawtransaction-debuglog branch from c3c4a7d to 495729b Compare August 14, 2020 16:34
@chappjc chappjc changed the title temp replace rpcclient v5 for extra logs in signrawtransaction use rawrequest for signrawtransaction to get error Errors Aug 14, 2020
@chappjc chappjc marked this pull request as ready for review August 14, 2020 16:36
@chappjc
Copy link
Copy Markdown
Member Author

chappjc commented Aug 14, 2020

I removed the rpcclient replace now that we have a RawRequest solution to inspect the walletjson.SignRawTransactionResult.Errors.

@chappjc chappjc force-pushed the rpcclient-signrawtransaction-debuglog branch from 495729b to f5f8b9f Compare August 14, 2020 16:52
@chappjc
Copy link
Copy Markdown
Member Author

chappjc commented Aug 14, 2020

Removed the retries since it seems like that the error is "wallet locked".

@chappjc chappjc changed the title use rawrequest for signrawtransaction to get error Errors client/asset/dcr: use rawrequest for signrawtransaction to get Errors Aug 14, 2020
@itswisdomagain
Copy link
Copy Markdown
Member

Removed the retries since it seems like that the error is "wallet locked".

I'm not entirely sure that's the only possible reason for signrawtx errors but I'm not sure retrying multiple times will avert any other error either. Having more info in error logs will surely be helpful in tracking down any other possible cause of signtxerrors.

Comment thread client/asset/dcr/dcr.go Outdated
Comment thread client/asset/dcr/dcr.go Outdated
@chappjc chappjc merged commit 14846a5 into decred:master Aug 17, 2020
@chappjc chappjc deleted the rpcclient-signrawtransaction-debuglog branch August 17, 2020 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants