So I am creating a transaction using TransactionBuilder like this:
var builder = new TransactionBuilder();
Transaction tx = builder
.AddCoins(coins)
.AddKeys(privateKeys)
.Send(recipientAddress, Money.Coins(amount))
.SetChange(changeAddress)
.SendFees(Money.Coins(fee))
.BuildTransaction(sign: true);
Boolean verified = builder.Verify(tx);
And then I propagate it to the network like so:
using (var node = Node.ConnectToLocal(network))
{
node.VersionHandshake();
node.SendMessage(new InvPayload(InventoryType.MSG_TX, tx.GetHash()));
node.SendMessage(new TxPayload(tx));
Thread.Sleep(500);
}
I have two questions:
What does the
builder.Verify(tx)
even tell us? It returns a boolean, but sometimes I can propagate transactions that returnedfalse
. What does verify mean/do?Since
Verify()
doesn't really tell us if a transaction will successfully propagate, how do I determine when a transaction made using TransactionBuilder will or won't propagate to the network?