Always stem local txs if configured that way (unless explicitly fluffed) (#2876)
* always stem local txs if configured that way (unless explicitly fluff from wallet) this overrides current epoch behavior for txs coming in via "push-api" rename "local" to "our" txs * TxSource is now an enum for type safety.
This commit is contained in:
@@ -229,10 +229,7 @@ where
|
||||
}
|
||||
|
||||
pub fn test_source() -> TxSource {
|
||||
TxSource {
|
||||
debug_name: format!("test"),
|
||||
identifier: format!("127.0.0.1"),
|
||||
}
|
||||
TxSource::Broadcast
|
||||
}
|
||||
|
||||
pub fn clean_output_dir(db_root: String) {
|
||||
|
||||
@@ -19,10 +19,12 @@ use self::core::core::{transaction, Block, BlockHeader, Weighting};
|
||||
use self::core::libtx;
|
||||
use self::core::pow::Difficulty;
|
||||
use self::keychain::{ExtKeychain, Keychain};
|
||||
use self::pool::TxSource;
|
||||
use self::util::RwLock;
|
||||
use crate::common::*;
|
||||
use grin_core as core;
|
||||
use grin_keychain as keychain;
|
||||
use grin_pool as pool;
|
||||
use grin_util as util;
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -237,7 +239,7 @@ fn test_the_transaction_pool() {
|
||||
assert_eq!(write_pool.total_size(), 6);
|
||||
let entry = write_pool.txpool.entries.last().unwrap();
|
||||
assert_eq!(entry.tx.kernels().len(), 1);
|
||||
assert_eq!(entry.src.debug_name, "deagg");
|
||||
assert_eq!(entry.src, TxSource::Deaggregate);
|
||||
}
|
||||
|
||||
// Check we cannot "double spend" an output spent in a previous block.
|
||||
@@ -447,7 +449,7 @@ fn test_the_transaction_pool() {
|
||||
assert_eq!(write_pool.total_size(), 6);
|
||||
let entry = write_pool.txpool.entries.last().unwrap();
|
||||
assert_eq!(entry.tx.kernels().len(), 1);
|
||||
assert_eq!(entry.src.debug_name, "deagg");
|
||||
assert_eq!(entry.src, TxSource::Deaggregate);
|
||||
}
|
||||
|
||||
// Check we cannot "double spend" an output spent in a previous block.
|
||||
|
||||
Reference in New Issue
Block a user