diff --git a/src/avalanche/peermanager.h b/src/avalanche/peermanager.h --- a/src/avalanche/peermanager.h +++ b/src/avalanche/peermanager.h @@ -33,6 +33,12 @@ namespace avalanche { +/** + * Maximum number of proofs to store per utxo. This will allow for conflict + * resolution when several proofs claim the same utxo. + */ +static constexpr size_t AVALANCHE_MAXPROOF_PER_UTXO = 1; + /** * Maximum number of stakes in the orphanProofs. * Benchmarking on a consumer grade computer shows that 10000 stakes can be @@ -181,7 +187,8 @@ public: // Limit the pool to a depth to a single proof per utxo - PeerManager() : pool(1) {} + PeerManager(size_t maxProofsPerUtxo = AVALANCHE_MAXPROOF_PER_UTXO) + : pool(maxProofsPerUtxo) {} /** * Node API.