Page MenuHomePhabricator

[mining] Change inBlock to be an unordered set
Needs RevisionPublic

Authored by schancel on Apr 23 2019, 01:23.

Details

Reviewers
deadalnix
jasonbcox
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Summary

Currently inBlock is a std::set<txiter, CompareIteratorByHash>, which depends on having
a txiter (indexed_transaction_set::nth_index<0>::type::iterator). In future changes to
package handling, we want to avoid being dependent on mempool data structures of mapTx.

This commit is a step in that direction. We convert std::set<txiter, CompareIteratorByHash>
to an std::unordered_set<TxId, SaltedTxidHasher>. Which allows us to tell if a TxId has
already been added to the block template.

Depends on D2864

Test Plan
make check && ./test/functional/test_runner.py

Diff Detail

Repository
rABC Bitcoin ABC
Branch
chains-for-real4 (branched from master)
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 5571
Build 9204: Bitcoin ABC Buildbot (legacy)
Build 9203: arc lint + arc unit

Event Timeline

Owners added a reviewer: Restricted Owners Package.Apr 23 2019, 01:23
jasonbcox requested changes to this revision.Jun 21 2019, 22:00
This revision now requires changes to proceed.Jun 21 2019, 22:00