Skip to content
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

Improve chain state init efficiency #1580

Merged
merged 1 commit into from
Jun 8, 2020

Conversation

lindlof
Copy link
Contributor

@lindlof lindlof commented May 17, 2020

Remove unnecessary slice of all block indexes and
remove DB iteration over all block indexes that
used to determined the size of the slice

Remove unnecessary slice of all block indexes and
remove DB iteration over all block indexes that
used to determined the size of the slice.
@lindlof
Copy link
Contributor Author

lindlof commented May 17, 2020

Build and Test / Go CI (1.14) test failed for 624cbf3. Re-ran tests by pushing again with a different commit message and they succeeded.

Seem to be a fluke in address management and most certainly has nothing to do with this PR.

Run sh ./goclean.sh
+ go test -tags=rpctest ./...
ok  	github.com/btcsuite/btcd	0.035s
--- FAIL: TestAddrManagerSerialization (0.00s)
    addrmanager_internal_test.go:108: expected to find 5 addresses, found 4
FAIL
FAIL	github.com/btcsuite/btcd/addrmgr	0.148s
ok  	github.com/btcsuite/btcd/blockchain	2.676s
?   	github.com/btcsuite/btcd/blockchain/fullblocktests	[no test files]
ok  	github.com/btcsuite/btcd/blockchain/indexers	0.035s
ok  	github.com/btcsuite/btcd/btcec	1.686s
ok  	github.com/btcsuite/btcd/btcjson	0.007s
ok  	github.com/btcsuite/btcd/chaincfg	0.006s
ok  	github.com/btcsuite/btcd/chaincfg/chainhash	0.006s
?   	github.com/btcsuite/btcd/cmd/addblock	[no test files]
?   	github.com/btcsuite/btcd/cmd/btcctl	[no test files]
?   	github.com/btcsuite/btcd/cmd/findcheckpoint	[no test files]
?   	github.com/btcsuite/btcd/cmd/gencerts	[no test files]
ok  	github.com/btcsuite/btcd/connmgr	0.131s
ok  	github.com/btcsuite/btcd/database	0.033s
?   	github.com/btcsuite/btcd/database/cmd/dbtool	[no test files]
ok  	github.com/btcsuite/btcd/database/ffldb	5.439s
ok  	github.com/btcsuite/btcd/database/internal/treap	0.021s
ok  	github.com/btcsuite/btcd/integration	7.677s
ok  	github.com/btcsuite/btcd/integration/rpctest	3.245s
?   	github.com/btcsuite/btcd/limits	[no test files]
ok  	github.com/btcsuite/btcd/mempool	0.236s
ok  	github.com/btcsuite/btcd/mining	0.031s

Copy link
Collaborator

@Rjected Rjected left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, LGTM unless others have objections to doing it this way

Copy link
Member

@jcvernaleo jcvernaleo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@jcvernaleo jcvernaleo merged commit b11bf58 into btcsuite:master Jun 8, 2020
@onyb onyb mentioned this pull request Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants