gavinandresen
commented at 3:05 PM on September 7, 2011:
contributor
Fix from luke-jr, I reviewed the code but have not tested.
Rough sketch of a test plan:
Run clean testnet-in-a-box bitcoind, with -keypool=1
Encrypt the wallet
Run bitcoind getnewaddress until it tell you keypool is exhausted
Generate a couple of blocks via internal miner
-- verify: coinbase transactions have unique txids even though they pay-to default key
Generate a couple of blocks via getwork RPC call
-- verify: coinbase transactions have unique txids
Update nTime after nExtraNonce to avoid potential race
(extraNonce being reset due to just-occurred time change after nTime is set)
3a8029f033
Reset extraNonce only every 15 seconds, just in case some miner is updating time himself and stuffaa4a9c5250
Reset extraNonce only when prevBlock changes, so miners can continue updating the time on their work until it's stale02d87b3aa3
Merge branch 'getwork_dedupe' into unique_coinbaseb760e25458
Save coinbase, not just extraNonce49c8e53ee2
Bugfix: Use timestamp in coinbase rather than "bits", needed to ensure coinbase txn is unique even if address is the same83f4cd156e
Merge branch 'unique_coinbase' of git://gitorious.org/~Luke-Jr/bitcoin/luke-jr-bitcoin into unique_coinbase5a3dea451d
TheBlueMatt
commented at 3:18 PM on September 7, 2011:
member
First of all, can we get commitmsgs that are readable?
alexwaters
commented at 7:50 PM on September 7, 2011:
contributor
Ok I did the steps above in a fresh build of 0.4.0rc1 with the testnet-in-a-box files, and landed at code:-12 error: Keypool ran out, please call keypoolrefill first
I then restarted my daemons with the -gen tag. Up to about 20 generated blocks now.
Lastly, I'm not familiar with RPC - is there any resource for how I would do a getwork call wtih RPC?
gavinandresen
commented at 11:12 PM on September 7, 2011:
contributor
getwork is how external miners ask for block headers to work on, so to test it you'd fire up a miner and tell it to ask for work from your bitcoind.
There's an external python-based miner in the config/pyminer/ directory (named pyminer.py) that aught to be handy for testing (it is very slow, though). If you're running testnet-in-a-box, note that you'll need to be running two bitcoinds talking to each other for any mining to get done.
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2026-04-22 06:16 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me