public int GetConfirmationCount(Height bestHeight) => Height == Height.Mempool ? 0 : bestHeight.Value - Height.Value + 1;
public SmartCoin(uint256 transactionId, int index, Script scriptPubKey, Money amount, TxoRef[] spentOutputs, Height height, bool rbf, string label = "", uint256 spenderTransactionId = null) { TransactionId = Guard.NotNull(nameof(transactionId), transactionId); Index = Guard.NotNull(nameof(index), index); ScriptPubKey = Guard.NotNull(nameof(scriptPubKey), scriptPubKey); Amount = Guard.NotNull(nameof(amount), amount); SpentOutputs = Guard.NotNull(nameof(spentOutputs), spentOutputs); Height = height; Label = Guard.Correct(label); SpenderTransactionId = spenderTransactionId; RBF = rbf; }
public void SetHeight(Height height, uint256 blockHash = null, int blockIndex = 0) { Height = height; BlockHash = blockHash; BlockIndex = blockIndex; }