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); } } }
public bool SameTip(PersistantChain chain) { return(Tip.HashBlock == chain.Tip.HashBlock); }
public ChainedBlock FindFork(PersistantChain chain) { return(FindFork(chain.ToEnumerable(true).Select(o => o.HashBlock))); }
public PersistantChain(PersistantChain copied) : this(copied, null) { }