Skip to content

Commit

Permalink
mempool: add warning about caller-responsibility cf. future timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
Sword-Smith committed May 11, 2024
1 parent d165fe9 commit 2d77009
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/models/state/mempool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ impl Mempool {
/// Insert a transaction into the mempool. It is the caller's responsibility to validate
/// the transaction. Also, the caller must ensure that the witness type is correct --
/// this method accepts only fully proven transactions (or, for the time being, faith witnesses).
/// The caller must also ensure that the transaction does not have a timestamp
/// in the too distant future.
pub fn insert(&mut self, transaction: &Transaction) -> Option<Digest> {
match transaction.witness.vast.witness_type {
WitnessType::RawWitness(_) => panic!("Can only insert fully proven transactions into mempool; not accepting raw witnesses."),
Expand Down

0 comments on commit 2d77009

Please sign in to comment.