public Task <IEnumerable <BalanceChange> > GetBalanceChangesAsync( ExodusTransaction transaction, CancellationToken cancellationToken) { if (transaction == null) { throw new ArgumentNullException(nameof(transaction)); } var simpleSend = (SimpleSendV0)transaction; var changes = new BalanceChange[] { new BalanceChange(simpleSend.Sender, PropertyAmount.Negate(simpleSend.Amount), simpleSend.Property), new BalanceChange(simpleSend.Receiver, simpleSend.Amount, simpleSend.Property), }; return(Task.FromResult(changes.AsEnumerable())); }
public void IsValidVersion_WithInvalidVersion_ShouldReturnFalse(int version) { Assert.False(ExodusTransaction.IsValidVersion(version)); }
public void IsValidVersion_WithValidVersion_ShouldReturnTrue(int version) { Assert.True(ExodusTransaction.IsValidVersion(version)); }
public void IsValidId_WithInvalidId_ShouldReturnFalse(int id) { Assert.False(ExodusTransaction.IsValidId(id)); }
public void IsValidId_WithValidId_ShouldReturnTrue(int id) { Assert.True(ExodusTransaction.IsValidId(id)); }
public static void SetExodusTransaction(this Transaction transaction, ExodusTransaction exodusTransaction) { ((ZcoinTransaction)transaction).ExodusTransaction = exodusTransaction; }
protected override void Encode(BinaryWriter writer, ExodusTransaction transaction) { FakeEncode(writer, transaction); }
public void InvokeEncode( BinaryWriter writer, ExodusTransaction transaction) { ((ITransactionPayloadEncoder)this).Encode(writer, transaction); }