mempool: Remove agendas from RemoveOrphansByTag.
This removes the treasury and auto revocations agenda flags from the exported RemoveOrphansByTag method since they are no longer used.
This commit is contained in:
parent
fdde83c23c
commit
983943b7ce
@ -454,8 +454,7 @@ func (mp *TxPool) RemoveOrphan(tx *dcrutil.Tx) {
|
||||
// identifier.
|
||||
//
|
||||
// This function is safe for concurrent access.
|
||||
func (mp *TxPool) RemoveOrphansByTag(tag Tag, isTreasuryEnabled,
|
||||
isAutoRevocationsEnabled bool) uint64 {
|
||||
func (mp *TxPool) RemoveOrphansByTag(tag Tag) uint64 {
|
||||
|
||||
var numEvicted uint64
|
||||
mp.mtx.Lock()
|
||||
|
||||
16
server.go
16
server.go
@ -2252,22 +2252,8 @@ func (s *server) peerDoneHandler(sp *serverPeer) {
|
||||
}
|
||||
|
||||
if sp.VersionKnown() {
|
||||
tipHash := &s.chain.BestSnapshot().Hash
|
||||
isTreasuryEnabled, err := s.chain.IsTreasuryAgendaActive(tipHash)
|
||||
if err != nil {
|
||||
srvrLog.Errorf("Could not obtain treasury agenda status: %v", err)
|
||||
}
|
||||
|
||||
isAutoRevocationsEnabled, err :=
|
||||
s.chain.IsAutoRevocationsAgendaActive(tipHash)
|
||||
if err != nil {
|
||||
srvrLog.Errorf("Could not obtain automatic ticket revocations agenda "+
|
||||
"status: %v", err)
|
||||
}
|
||||
|
||||
// Evict any remaining orphans that were sent by the peer.
|
||||
numEvicted := s.txMemPool.RemoveOrphansByTag(mempool.Tag(sp.ID()),
|
||||
isTreasuryEnabled, isAutoRevocationsEnabled)
|
||||
numEvicted := s.txMemPool.RemoveOrphansByTag(mempool.Tag(sp.ID()))
|
||||
if numEvicted > 0 {
|
||||
srvrLog.Debugf("Evicted %d %s from peer %v (id %d)", numEvicted,
|
||||
pickNoun(numEvicted, "orphan", "orphans"), sp, sp.ID())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user