public SmartContractWalletTransactionHandler( ILoggerFactory loggerFactory, IWalletManager walletManager, IWalletFeePolicy walletFeePolicy, Network network, StandardTransactionPolicy transactionPolicy) : base(loggerFactory, walletManager, walletFeePolicy, network, transactionPolicy) { }
public WalletTransactionHandlerTest() { // adding this data to the transaction output should increase the fee // 83 is the max size for the OP_RETURN script => 80 is the max for the content of the script byte[] maxQuantityOfBytes = Enumerable.Range(0, 80).Select(Convert.ToByte).ToArray(); this.costlyOpReturnData = Encoding.UTF8.GetString(maxQuantityOfBytes); this.standardTransactionPolicy = new StandardTransactionPolicy(this.Network); this.scriptAddressReader = new ScriptAddressReader(); }
public SmartContractWalletTransactionHandler( ILoggerFactory loggerFactory, IWalletManager walletManager, IWalletFeePolicy walletFeePolicy, Network network, StandardTransactionPolicy transactionPolicy, IReserveUtxoService utxoReservedService) : base(loggerFactory, walletManager, walletFeePolicy, network, transactionPolicy, utxoReservedService) { }
public WalletTransactionHandler( ILoggerFactory loggerFactory, IWalletManager walletManager, IWalletFeePolicy walletFeePolicy, Network network, StandardTransactionPolicy transactionPolicy) { this.network = network; this.walletManager = walletManager; this.walletFeePolicy = walletFeePolicy; this.logger = loggerFactory.CreateLogger(GetType().FullName); this.TransactionPolicy = transactionPolicy; }
public WalletTransactionHandler( ILoggerFactory loggerFactory, IWalletManager walletManager, IWalletFeePolicy walletFeePolicy, Network network, StandardTransactionPolicy transactionPolicy) { this.network = network; this.walletManager = walletManager; this.walletFeePolicy = walletFeePolicy; this.logger = loggerFactory.CreateLogger("Impleum.Bitcoin.Fullnode"); this.TransactionPolicy = transactionPolicy; }
public WalletTransactionHandler( ILoggerFactory loggerFactory, IWalletManager walletManager, IWalletFeePolicy walletFeePolicy, Network network, StandardTransactionPolicy transactionPolicy, IReserveUtxoService reservedUtxoService) { this.network = network; this.walletManager = walletManager; this.walletFeePolicy = walletFeePolicy; this.logger = loggerFactory.CreateLogger(this.GetType().FullName); this.TransactionPolicy = transactionPolicy; this.reserveUtxoService = reservedUtxoService; }
/// <inheritdoc /> public override void CheckTransaction(MempoolValidationContext context) { foreach (var txOut in context.Transaction.Outputs) { if (StandardTransactionPolicy.IsOpReturn(txOut.ScriptPubKey.ToBytes())) { continue; } if (txOut.IsDust(context.MinRelayTxFee)) { this.logger.LogTrace("(-)[TX_CONTAINS_DUST_TXOUTS]"); context.State.Fail(MempoolErrors.TransactionContainsDustTxOuts, $"{context.Transaction.GetHash()} contains a dust TxOut {txOut.ScriptPubKey.ToString()}.").Throw(); } } }
public WalletTransactionHandler( ILoggerFactory loggerFactory, IWalletManager walletManager, IWalletFeePolicy walletFeePolicy, Network network, StandardTransactionPolicy transactionPolicy) { this.network = network; this.walletManager = walletManager; this.walletFeePolicy = walletFeePolicy; this.logger = loggerFactory.CreateLogger(this.GetType().FullName); this.privateKeyCache = new MemoryCache(new MemoryCacheOptions() { ExpirationScanFrequency = new TimeSpan(0, 1, 0) }); this.TransactionPolicy = transactionPolicy; }
public WalletTransactionHandler( ILoggerFactory loggerFactory, IWalletManager walletManager, IWalletFeePolicy walletFeePolicy, Network network, StandardTransactionPolicy transactionPolicy) { this.network = network; this.walletManager = walletManager; this.walletFeePolicy = walletFeePolicy; this.logger = loggerFactory.CreateLogger(this.GetType().FullName); this.privateKeyCache = new MemoryCache(new MemoryCacheOptions() { ExpirationScanFrequency = new TimeSpan(0, 1, 0) }); this.TransactionPolicy = transactionPolicy; foreach (var wallet in this.walletManager.WalletsToUnlock) { this.UnlockWallet(wallet.Account, wallet.Password, wallet.Timeout); } }
static StandardTransactionGenerator() { _Policy = new StandardTransactionPolicy(); }