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
Added RPC call 'getmemorypool' to get list of transactions that would be #476
Conversation
Was there a design discussion for this anywhere? You're returning more than just the list of transactions, and there is some magic code I don't understand (like the ...GetTime() - nStart > 60 ... what is that about?) |
There wasn't a discussion - I assumed we'd have it here and I'd revise it. It also returns the previous block and the total amount of fees in those transactions. The previous block hash is important because these specific transactions are only valid following that block. The magic code is just a copy of the block caching code from the getwork handler. |
"If it is a more complicated or potentially controversial change, then the patch submitter will be asked to start a discussion (if they haven't already) on the development forums: http://www.bitcoin.org/smf/index.php?board=6.0 " ... from the top-level README. Please start a discussion on the forums or the bitcoin-dev mailing list. |
you still suggest anyone try to start a sensible discussion on those forums? |
by the way, wanted to make a note @gavinandresen : this will also be useful for writing that cross-client test-suite you were talking about. when we were discussing it, you were primarily focusing on sending client various bits of blockchain. however, as we know from the existing bug where transactions with duplicate inputs are treated as valid for the purposes of rebroadcast, testing the client by sending it a bunch of weird transactions would be good too. and this getmemorypool functionality would let you query the client to see if it has 'accepted' the transaction. just a thought. :) |
can you rebase this against 0.4rc? |
Rebased. |
I'm soooo excited about it! :-D Thanks to this the awesome decentralized p2pool can now include transactions and make actual use of the mining power :-) Thanks |
I'd like to pull this; can you rebase again? |
…struct a block with a custom generation transaction and submit a solution getmemorypool [data] If [data] is not specified, returns data needed to construct a block to work on: "version" : block version "previousblockhash" : hash of current highest block "transactions" : contents of non-coinbase transactions that should be included in the next block "coinbasevalue" : maximum allowable input to coinbase transaction, including the generation award and transaction fees "time" : timestamp appropriate for next block "bits" : compressed target of next block If [data] is specified, tries to solve the block and returns true if it was successful.
Rebased. Thanks! |
Added RPC call 'getmemorypool' for p2p mining pools
Added RPC call 'getmemorypool' for p2p mining pools
Added RPC call 'getmemorypool' to get list of transactions that would be included in a generated block.
This is useful for any program that wants to create its own generation transaction while mining.
P2Pool recently generated its first block, and this patch would let it include transactions.