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 OK
Unit
No Unit Test Coverage
Build Status
Buildable 6108
Build 10264: Bitcoin ABC Teamcity Staging
Build 10263: arc lint + arc unit

Event Timeline

schancel created this revision.Apr 23 2019, 01:23
Owners added a reviewer: Restricted Owners Package.Apr 23 2019, 01:23
Herald added a reviewer: Restricted Project. · View Herald TranscriptApr 23 2019, 01:23
schancel updated this revision to Diff 9067.Jun 2 2019, 07:25

Rebase

jasonbcox requested changes to this revision.Jun 21 2019, 22:00
This revision now requires changes to proceed.Jun 21 2019, 22:00