示例#1
0
 private void AddEvent(UTXOEvent evt)
 {
     _BookmarkProcessor.PushNew();
     _BookmarkProcessor.AddData(evt.TxId.ToBytes());
     _BookmarkProcessor.AddData(evt.Outpoint);
     _BookmarkProcessor.AddData(evt.Received);
     _BookmarkProcessor.UpdateBookmark();
 }
示例#2
0
        private void AddEvent(UTXOEvent evt)
        {
            Events.Add(evt);

            _Hasher.Position = 0;
            _Hasher.Write(_CurrentHash, 0, 32);
            _Hasher.Write(evt.TxId.ToBytes(), 0, 32);
            var bs       = new BitcoinStream(_Hasher, true);
            var outpoint = evt.Outpoint;

            bs.ReadWrite(ref outpoint);
            _Hasher.WriteByte((byte)(evt.Received ? 1 : 0));
            _CurrentHash = Hashes.SHA256(_Buffer);
        }