getnewblockhex: add ability to pass over transactions based on mempoo… - #339
Conversation
| UniValue getnewblockhex(const JSONRPCRequest& request) | ||
| { | ||
| if (request.fHelp || request.params.size() != 0) | ||
| if (request.fHelp || request.params.size() > 1) |
There was a problem hiding this comment.
need to list optional arg in the line 2 lines down
| } | ||
|
|
||
| // Skip transactions that are under X seconds in mempool | ||
| if (iter->GetTime() > current_time - required_age_in_secs) { |
There was a problem hiding this comment.
no, I had it backwards first as well, which led to transactions only being accepted within first X seconds :)
| * Increments nPackagesSelected / nDescendantsUpdated with corresponding | ||
| * statistics from the package selection (for logging statistics). */ | ||
| void addPackageTxs(int &nPackagesSelected, int &nDescendantsUpdated); | ||
| void addPackageTxs(int &nPackagesSelected, int &nDescendantsUpdated, int required_age_in_secs=0); |
There was a problem hiding this comment.
Do we need the default value here too? It defaults to 0 on the rpc already.
Same for CreateNewBlock although I guess there we do need it for generate.
There was a problem hiding this comment.
I'm just passing it through, since we only want to use it with "getnewblockhex" type stuff and not generate.
There was a problem hiding this comment.
But only with the default value in CreateNewBlock should be enough, no?
|
utACK ed121e8. Is the Travis failure expected? |
|
@sipa we're not sure... it's 1 of 2 travis runs that is failing the gpg signature checks. We've had this before but can't recall if we just ignored it or fixed it somehow... |
…ed on mempoo… ed121e8 getnewblockhex: add ability to pass over transactions based on mempool age (Gregory Sanders)
|
merging, hoping the issue is something that will go away... |
|
yep tip seems fine |
c3fe935 test compact block rpcs (Gregory Sanders) c3cbe6e compact block RPC calls (Gregory Sanders) Pull request description: Combined with #339 should be pretty powerful for speed of block proposal transmission. Tree-SHA512: 305256b844a28542bb720ab86a36ec91982dd41c4d8e455e34ad3db12daa6e8b25ccfe2728fa514812655c2121c8d1d36e71f2af83f86b2de6c5d0c72541d79e
…l age
Can be used to improve block convergence performance with compact blocks and other mempool sharing based schemes.
related to #338