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

txdb: Fix assert crash in new UTXO set cursor #7904

Merged
merged 1 commit into from Apr 19, 2016

Conversation

Projects
None yet
3 participants
@laanwj
Member

laanwj commented Apr 18, 2016

Remove the mistaken assumption that GetKey returning false signifies an internal database issue. It will return false when the key cannot be deserialized into the (char,uint256) stanza, which indicates that the cursor has reached a different kind of key.

Fixes bug #7890 introduced in #7756.

txdb: Fix assert crash in new UTXO set cursor
Remove the mistaken assumption that GetKey returning false signifies
an internal database issue. It will return false when the key cannot
be deserialized into the (char,uint256) stanza, which indicates
that the cursor has reached a different kind of key.

Fixes bug #7890 introduced in #7756.
@sipa

This comment has been minimized.

Show comment
Hide comment
@sipa

sipa Apr 18, 2016

Member

utACK a3310b4

Member

sipa commented Apr 18, 2016

utACK a3310b4

@paveljanik

This comment has been minimized.

Show comment
Hide comment
@paveljanik

paveljanik Apr 18, 2016

Contributor

tested ACK a3310b4

Current master aborts at the end of gettxoutsetinfo:

Assertion failed: (ok), function Next, file txdb.cpp, line 139.
Abort trap: 6

With this change, the command finished without abort.

Thanks!

Contributor

paveljanik commented Apr 18, 2016

tested ACK a3310b4

Current master aborts at the end of gettxoutsetinfo:

Assertion failed: (ok), function Next, file txdb.cpp, line 139.
Abort trap: 6

With this change, the command finished without abort.

Thanks!

@laanwj laanwj merged commit a3310b4 into bitcoin:master Apr 19, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Apr 19, 2016

Merge #7904: txdb: Fix assert crash in new UTXO set cursor
a3310b4 txdb: Fix assert crash in new UTXO set cursor (Wladimir J. van der Laan)

codablock added a commit to codablock/dash that referenced this pull request Sep 16, 2017

Merge bitcoin#7904: txdb: Fix assert crash in new UTXO set cursor
a3310b4 txdb: Fix assert crash in new UTXO set cursor (Wladimir J. van der Laan)

codablock added a commit to codablock/dash that referenced this pull request Sep 19, 2017

Merge bitcoin#7904: txdb: Fix assert crash in new UTXO set cursor
a3310b4 txdb: Fix assert crash in new UTXO set cursor (Wladimir J. van der Laan)

codablock added a commit to codablock/dash that referenced this pull request Sep 27, 2017

Merge bitcoin#7904: txdb: Fix assert crash in new UTXO set cursor
a3310b4 txdb: Fix assert crash in new UTXO set cursor (Wladimir J. van der Laan)

codablock added a commit to codablock/dash that referenced this pull request Oct 12, 2017

Merge bitcoin#7904: txdb: Fix assert crash in new UTXO set cursor
a3310b4 txdb: Fix assert crash in new UTXO set cursor (Wladimir J. van der Laan)

codablock added a commit to codablock/dash that referenced this pull request Oct 19, 2017

Merge bitcoin#7904: txdb: Fix assert crash in new UTXO set cursor
a3310b4 txdb: Fix assert crash in new UTXO set cursor (Wladimir J. van der Laan)

UdjinM6 added a commit to UdjinM6/dash that referenced this pull request Nov 8, 2017

Merge bitcoin#7904: txdb: Fix assert crash in new UTXO set cursor
a3310b4 txdb: Fix assert crash in new UTXO set cursor (Wladimir J. van der Laan)

str4d added a commit to str4d/zcash that referenced this pull request Jan 27, 2018

Break circular dependency main ↔ txdb
Break the circular dependency between main and txdb by:

- Moving `CBlockFileInfo` from `main.h` to `chain.h`. I think this makes
  sense, as the other block-file stuff is there too.

- Moving `CDiskTxPos` from `main.h` to `txdb.h`. This type seems
  specific to txdb.

- Pass a functor `insertBlockIndex` to `LoadBlockIndexGuts`. This leaves
  it up to the caller how to insert block indices.

Zcash: This does not actually break the circular dependency for us yet, as we
still need to pull in bitcoin/bitcoin#7756 and bitcoin/bitcoin#7904.

str4d added a commit to str4d/zcash that referenced this pull request Mar 9, 2018

Break circular dependency main ↔ txdb
Break the circular dependency between main and txdb by:

- Moving `CBlockFileInfo` from `main.h` to `chain.h`. I think this makes
  sense, as the other block-file stuff is there too.

- Moving `CDiskTxPos` from `main.h` to `txdb.h`. This type seems
  specific to txdb.

- Pass a functor `insertBlockIndex` to `LoadBlockIndexGuts`. This leaves
  it up to the caller how to insert block indices.

Zcash: This does not actually break the circular dependency for us yet, as we
still need to pull in bitcoin/bitcoin#7756 and bitcoin/bitcoin#7904.

str4d added a commit to str4d/zcash that referenced this pull request Mar 12, 2018

Break circular dependency main ↔ txdb
Break the circular dependency between main and txdb by:

- Moving `CBlockFileInfo` from `main.h` to `chain.h`. I think this makes
  sense, as the other block-file stuff is there too.

- Moving `CDiskTxPos` from `main.h` to `txdb.h`. This type seems
  specific to txdb.

- Pass a functor `insertBlockIndex` to `LoadBlockIndexGuts`. This leaves
  it up to the caller how to insert block indices.

Zcash: This does not actually break the circular dependency for us yet, as we
still need to pull in bitcoin/bitcoin#7756 and bitcoin/bitcoin#7904.

str4d added a commit to str4d/zcash that referenced this pull request Mar 15, 2018

Break circular dependency main ↔ txdb
Break the circular dependency between main and txdb by:

- Moving `CBlockFileInfo` from `main.h` to `chain.h`. I think this makes
  sense, as the other block-file stuff is there too.

- Moving `CDiskTxPos` from `main.h` to `txdb.h`. This type seems
  specific to txdb.

- Pass a functor `insertBlockIndex` to `LoadBlockIndexGuts`. This leaves
  it up to the caller how to insert block indices.

Zcash: This does not actually break the circular dependency for us yet, as we
still need to pull in bitcoin/bitcoin#7756 and bitcoin/bitcoin#7904.

str4d added a commit to str4d/zcash that referenced this pull request Mar 30, 2018

Break circular dependency main ↔ txdb
Break the circular dependency between main and txdb by:

- Moving `CBlockFileInfo` from `main.h` to `chain.h`. I think this makes
  sense, as the other block-file stuff is there too.

- Moving `CDiskTxPos` from `main.h` to `txdb.h`. This type seems
  specific to txdb.

- Pass a functor `insertBlockIndex` to `LoadBlockIndexGuts`. This leaves
  it up to the caller how to insert block indices.

Zcash: This does not actually break the circular dependency for us yet, as we
still need to pull in bitcoin/bitcoin#7756 and bitcoin/bitcoin#7904.

str4d added a commit to str4d/zcash that referenced this pull request Apr 4, 2018

Break circular dependency main ↔ txdb
Break the circular dependency between main and txdb by:

- Moving `CBlockFileInfo` from `main.h` to `chain.h`. I think this makes
  sense, as the other block-file stuff is there too.

- Moving `CDiskTxPos` from `main.h` to `txdb.h`. This type seems
  specific to txdb.

- Pass a functor `insertBlockIndex` to `LoadBlockIndexGuts`. This leaves
  it up to the caller how to insert block indices.

Zcash: This does not actually break the circular dependency for us yet, as we
still need to pull in bitcoin/bitcoin#7756 and bitcoin/bitcoin#7904.

str4d added a commit to str4d/zcash that referenced this pull request May 31, 2018

Break circular dependency main ↔ txdb
Break the circular dependency between main and txdb by:

- Moving `CBlockFileInfo` from `main.h` to `chain.h`. I think this makes
  sense, as the other block-file stuff is there too.

- Moving `CDiskTxPos` from `main.h` to `txdb.h`. This type seems
  specific to txdb.

- Pass a functor `insertBlockIndex` to `LoadBlockIndexGuts`. This leaves
  it up to the caller how to insert block indices.

Zcash: This does not actually break the circular dependency for us yet, as we
still need to pull in bitcoin/bitcoin#7756 and bitcoin/bitcoin#7904.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment