Skip to content

Conversation

gavinandresen
Copy link
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

@TheBlueMatt
Copy link
Contributor

First of all, can we get commitmsgs that are readable?

@alexwaters
Copy link
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.

My Ubuntu skills are lacking, the txids look unique to me; but obviously that's not good enough. Any help with http://bitcoin.stackexchange.com/questions/706/how-do-i-sort-the-output-of-listtransactions would be appreciated.

Lastly, I'm not familiar with RPC - is there any resource for how I would do a getwork call wtih RPC?

@gavinandresen
Copy link
Contributor Author

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.

I just tried:

pyminer.py bcc1.cfg

... and got:
2 mining threads started
Wed Sep 7 19:08:12 2011 Miner Starts - 127.0.0.1:9000
HashMeter(0): 1000000 hashes, 249.67 Khash/sec
HashMeter(1): 1000000 hashes, 255.08 Khash/sec

where bcc1.cfg contains settings that match my weird testnet-in-a-box setup (running with rpcport=9000):

host=127.0.0.1
port=9000
rpcuser=abc
rpcpass=123
threads=2
scantime=60
hashmeter=1

@sipa
Copy link
Member

sipa commented Sep 8, 2011

The commits are a bit messy - lots of changes that are not used in later commits. ACK on the actual code change though (though it needs testing).

@alexwaters
Copy link
Contributor

Tested, no duplicate txids.

gavinandresen added a commit that referenced this pull request Sep 9, 2011
@gavinandresen gavinandresen merged commit b7598ce into bitcoin:master Sep 9, 2011
coblee referenced this pull request in litecoin-project/litecoin Jul 17, 2012
zathras-crypto pushed a commit to zathras-crypto/omnicore that referenced this pull request Nov 29, 2017
50874a4 Fix "failed to find property creatd by {txid}" log spam from unconfirmed property creations (Zathras)
8fb15da Fix "could not locate sub sends in txlistdb" log spam from unconfirmed Send All txs (Zathras)
kallewoof pushed a commit to kallewoof/bitcoin that referenced this pull request Oct 4, 2019
…chains

91dd327 Disable functional tests for bitcoin_functional build (Gregory Sanders)
b8820d1 Activate CSV from genesis block for custom chains (Gregory Sanders)

Pull request description:

  Guts the test for elements mode, can add back later if worked on.

Tree-SHA512: a2b7633fa02dae582616ac26d25cd08f895d5940e3775c70cacdd3f678f01a21cbcaf56c6c540b91bd8535bb1aab7bdc59e2a79b5a1124cbd9d3f03f29d0b40e
rajarshimaitra pushed a commit to rajarshimaitra/bitcoin that referenced this pull request Aug 5, 2021
Chapter 1,2,3 - punctuation, typos, simplifications
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
@maflcko maflcko removed the CI failed label Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants