Пример #1
0
 public void Write(LedgerStateChange change)
 {
     Write(change.Accounts, Write);
     Write(change.MultiSignatures, Write);
     Write(change.HashLocks, Write);
     Write(change.TimeLocks, Write);
 }
Пример #2
0
 private byte[] GetLedgerStateChangeBytes(LedgerStateChange change)
 {
     using (var stream = new ByteStream())
     {
         stream.Write(change);
         return(stream.GetBytes());
     }
 }
        private DataTransformationContext RebuildContext(DataTransformationContext context, HashSet <Address> knownAccounts)
        {
            var oldState          = context.SignedLedgerState.State;
            var accounts          = MarkNewAccounts(knownAccounts, oldState.Accounts);
            var state             = new LedgerStateChange(accounts, oldState.MultiSignatures, oldState.HashLocks, oldState.TimeLocks, oldState.VendingMachines);
            var signedLedgerState = new SignedLedgerState(context.SignedLedgerState.Ledger, state);

            return(new DataTransformationContext(signedLedgerState));
        }