Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add async rpc call z_sendmany #1271

Conversation

bitcartel
Copy link
Contributor

For issue #1200
Depends on #1205 #1208 #1233

str4d and others added 11 commits August 9, 2016 17:38
Modified RPC calls dumpwallet and importwallet to include spending keys.
taddr and zaddr.  Restore behaviour of dumpwallet and importwallet
to only handle taddr.
CWallet
- GenerateNewZKey()
- AddZKey()
- LoadZKey()
- LoadZKeyMetadata()
CWalletDB
- WriteZKey()
Fix incorrect method name used in error message.
z_importwallet, z_exportwallet
z_importkey, z_exportkey
z_listaddresses
Add z_getoperationstatus RPC command.
Add z_sendmany RPC command (dummy implementation, does not send actual
coins).
@bitcartel bitcartel added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 17, 2016
@bitcartel bitcartel self-assigned this Aug 17, 2016
@bitcartel
Copy link
Contributor Author

Notes:

Async queue class can have more than one worker (default) and this could be added as a conf option.
Everything is in memory only, nothing is persisted to disk.
z_sendmany currently checks the input parameters but does not send.

Example output:

TERMINAL% ./zcashd -daemon
Zcash server starting
TERMINAL% ./zcash-cli z_sendmany mt8nv6J71e9ck57ADVTwfSBmUz5XbZzttg '[{"address":"mt8nv6J71e9ck57ADVTwfSBmUz5XbZzttg", "amount":1.0}, {"address":"tnNKjG8vQDptwJ8Wvtpekiu6Kncyv47JVMHiKpnW9JTTQxGVe7C7z9pkSkEB6ptZmtPWSc9PcysLn4Geisk7prggdJcifUr","amount":3.451233141234234}]'
5eebb77c-e385-4277-aae3-d31a0dabb7c8
TERMINAL% 
z_sendmany: **************** DUMMY RUN *****************
z_sendmany: source of funds: mt8nv6J71e9ck57ADVTwfSBmUz5XbZzttg
z_sendmany: minconf: 1
z_sendmany: send 100000000 to mt8nv6J71e9ck57ADVTwfSBmUz5XbZzttg
z_sendmany: send 345123314 to tnNKjG8vQDptwJ8Wvtpekiu6Kncyv47JVMHiKpnW9JTTQxGVe7C7z9pkSkEB6ptZmtPWSc9PcysLn4Geisk7prggdJcifUr
z_sendmany: checking balances and selecting coins and notes...
z_sendmany: performing a joinsplit...
z_sendmany: attempting to broadcast to network...
z_sendmany: operation complete!
z_sendmany: ********************************************

TERMINAL% ./zcash-cli z_getoperationstatus 5eebb77c-e385-4277-aae3-d31a0dabb7c8
{
    "id" : "5eebb77c-e385-4277-aae3-d31a0dabb7c8",
    "status" : "success",
    "creation_time" : 1471461975,
    "result" : {
        "dummy_txid" : "4a1298544a1298544a1298544a1298544a129854",
        "dummy_fee" : 0.00010000
    },
    "execution_secs" : 7.00164264
}
TERMINAL% ./zcash-cli z_getoperationstatus 5eebb77c-e385-4277-aae3-d31a0dabb7c8
error: {"code":-8,"message":"No operation exists for that id."}
TERMINAL% ./zcash-cli stop                                                
Bitcoin server stopping

@bitcartel
Copy link
Contributor Author

Closing due to git voodoo. PR moves to #1274

@bitcartel bitcartel closed this Aug 18, 2016
@bitcartel bitcartel deleted the z8_rpc_async_rebase_z8rpckeys_1199keys_1199notes branch August 18, 2016 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants