Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Add test for CWalletTx::GetImmatureCredit() returning stale values. #9359
+25
−0
Conversation
|
Seems a duplicate of #8717? (except that you add a test) |
fanquake
added
the
Wallet
label
Dec 16, 2016
|
Right. Will merge #8717 first, then we can rebase this into a test-only pull. |
MarcoFalke
added
the
Tests
label
Dec 21, 2016
| + | ||
| + // Call GetImmatureCredit() once before adding the key to the wallet to | ||
| + // cache the current immature credit amount, which is 0. | ||
| + BOOST_CHECK_EQUAL(wtx.GetImmatureCredit(), 0); |
MarcoFalke
Dec 21, 2016
Member
Travis:
Assertion failed: lock cs_main not held in ../../src/wallet/wallet.cpp:3761; locks held:
Running 221 test cases...
unknown location(0): fatal error: in "wallet_tests/coin_mark_dirty_immature_credit": signal: SIGABRT (application abort requested)
../../src/wallet/test/wallet_tests.cpp(371): last checkpoint
test_bitcoin: ../../src/key.cpp:300: void ECC_Start(): Assertion `secp256k1_context_sign == __null' failed.
unknown location(0): fatal error: in "wallet_tests/coin_selection_tests": signal: SIGABRT (application abort requested)
../../src/wallet/test/wallet_tests.cpp(70): last checkpoint: "coin_selection_tests" fixture entry.
test_bitcoin: ../../src/key.cpp:300: void ECC_Start(): Assertion `secp256k1_context_sign == __null' failed.
unknown location(0): fatal error: in "wallet_crypto/decrypt": signal: SIGABRT (application abort requested)
../../src/wallet/test/crypto_tests.cpp(217): last checkpoint: "decrypt" fixture entry.
ryanofsky
changed the title from
Fix CWalletTx::GetImmatureCredit() returning stale values.
to
Add test for CWalletTx::GetImmatureCredit() returning stale values.
Dec 21, 2016
|
ACK 52045d1 (test passes on version rebased onto master) |
|
Rebased 52045d1 -> 7ed143c (immature.5 -> immature.6) because of conflict with recent changes in wallet_tests.cpp. |
|
utACK 7ed143c. Sorry, somehow forgot about this pull. |
MarcoFalke
merged commit 7ed143c
into
bitcoin:master
Mar 2, 2017
1 check passed
continuous-integration/travis-ci/pr
The Travis CI build passed
Details
added a commit
that referenced
this pull request
Mar 2, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ryanofsky commentedDec 16, 2016
•
Edited 1 time
-
ryanofsky
Dec 21, 2016
Fix CWalletTx::GetImmatureCredit() returning stale values.One line fix. Add missing assignment to CWalletTx::MarkDirty() to clear the cached immature credit flag.Updated description: Add test for cached immature credit flag not being cleared in CWalletTx::MarkDirty() bug, which was fixed in #8717, commit a560378.