Closed samvaughton closed 3 years ago
One solution would be to accept the passphrase in the walletpassphrase [pass] 1 false
call to unlock it fully for that period of time before reverting to the staking mode again?
It now returns a new error code -18 to help you figure out the initial state: https://github.com/reddcoin-project/reddcoin/commit/9e0982ad82df6b17847147a9c2026eef25a7cd27
If I describe the scenario it will be easier:
walletpassphrase [pass] [timeout] true
sendtoaddress
.-13
error which isRPC_WALLET_UNLOCK_NEEDED
.walletpassphrase [pass] 1 false
call to unlock it quickly for a send command.-17
which isRPC_WALLET_ALREADY_UNLOCKED
.This means the process to be able to stake and send a coin will be to:
As you can see this is a tedious process and is actually impossible anyway since I cannot tell if we are in "staking" mode except for tracking the state myself. Which is not the solution since these are RPC calls for everyone and should be handled as such. The state in
getstakinginfo.enabled
can betrue
when the wallet is unlocked fully or just staking which does not help.Solutions to solve this?
I would also think we need a field for the states of the wallet ie
locked
,unlocked
,staking
.I know my previous issues conflict with this but I didn't foresee it and it seems we need to improve upon this whole scenario.