Created
April 6, 2015 03:30
-
-
Save dexX7/273529eebd07967f484c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Not a RPC call at all! | |
Value HandleTxCreation(const Array& params) { | |
bool fBroadcast = params.back().get_bool(); | |
// actual implemenation | |
// ... | |
} | |
// RPC call for creation | |
Value tx_create(const Array& params, bool fHelp) | |
{ | |
if (fHelp || params.size() < 4 || params.size() > 6) | |
throw std::runtime_error( | |
"tx_create ... ... ... ... ..." | |
); | |
// push some fillers to blank the default params maybe? | |
// push broadcasting flag | |
params.push_back(false); | |
return HandleTxCreation(params); | |
} | |
// RPC call for broadcasting | |
Value tx_broadcast(const Array& params, bool fHelp) | |
{ | |
if (fHelp || params.size() < 4 || params.size() > 6) | |
throw std::runtime_error( | |
"tx_broadcast ... ... ... ... ..." | |
); | |
// push some fillers to blank the default params maybe? | |
// push broadcasting flag | |
params.push_back(true); | |
return HandleTxCreation(params); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment