Exemple #1
0
 public PersistantChain(PersistantChain copied, ObjectStream <ChainChange> changes)
 {
     if (changes == null)
     {
         changes = new StreamObjectStream <ChainChange>();
     }
     AssertEmpty(changes);
     _Changes = changes;
     copied.Changes.Rewind();
     foreach (var change in copied.Changes.Enumerate())
     {
         if (_NextToProcess < copied._NextToProcess)
         {
             PushChange(change, null);
         }
         else
         {
             _Changes.WriteNext(change);
         }
     }
 }
Exemple #2
0
 public bool SameTip(PersistantChain chain)
 {
     return(Tip.HashBlock == chain.Tip.HashBlock);
 }
Exemple #3
0
 public ChainedBlock FindFork(PersistantChain chain)
 {
     return(FindFork(chain.ToEnumerable(true).Select(o => o.HashBlock)));
 }
Exemple #4
0
 public PersistantChain(PersistantChain copied)
     : this(copied, null)
 {
 }