mirror of
https://github.com/Xahau/xahaud.git
synced 2026-08-23 16:30:52 +00:00
refactor(consensus): remove orphaned txset cache callback
This commit is contained in:
@@ -570,7 +570,6 @@ struct ExportTickHarness
|
||||
std::size_t prevProposers = 4;
|
||||
int updates = 0;
|
||||
int proposes = 0;
|
||||
int caches = 0;
|
||||
|
||||
void
|
||||
addPeer(
|
||||
@@ -633,7 +632,6 @@ struct ExportTickHarness
|
||||
},
|
||||
.propose = [&]() { ++proposes; },
|
||||
.haveConsensus = []() { return true; },
|
||||
.cacheAndShareTxSet = [&](FakeTxSet const&) { ++caches; },
|
||||
.getTxns = [&]() -> FakeTxSet const& { return txns; }};
|
||||
|
||||
return extensionsTick(ext, ctx);
|
||||
|
||||
@@ -1603,11 +1603,6 @@ Consensus<Adaptor>::phaseEstablish(
|
||||
},
|
||||
.propose = [&]() { adaptor_.propose(result_->position); },
|
||||
.haveConsensus = [&]() { return haveConsensus(clog); },
|
||||
.cacheAndShareTxSet =
|
||||
[&](TxSet_t const& txSet) {
|
||||
acquired_.emplace(txSet.id(), txSet);
|
||||
adaptor_.share(txSet);
|
||||
},
|
||||
.getTxns = [&]() -> TxSet_t const& { return result_->txns; },
|
||||
};
|
||||
auto tickResult = adaptor_.ce().onTick(ctx);
|
||||
|
||||
@@ -331,7 +331,6 @@ struct ConsensusTick
|
||||
std::function<void(Position const&)> updatePosition;
|
||||
std::function<void()> propose;
|
||||
std::function<bool()> haveConsensus;
|
||||
std::function<void(TxSet const&)> cacheAndShareTxSet;
|
||||
std::function<TxSet const&()> getTxns;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user