示例#1
0
 public bool Equals(Bloom other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     return(Nethermind.Core.Extensions.Bytes.AreEqual(Bytes, other.Bytes));
 }
示例#2
0
 private void Set(Span <byte> sequence, Bloom masterBloom = null)
 {
     Bloom.BloomExtract indexes = GetExtract(sequence);
     Set(indexes.Index1);
     Set(indexes.Index2);
     Set(indexes.Index3);
     if (masterBloom != null)
     {
         masterBloom.Set(indexes.Index1);
         masterBloom.Set(indexes.Index2);
         masterBloom.Set(indexes.Index3);
     }
 }
示例#3
0
 public void Add(LogEntry[] logEntries, Bloom blockBloom)
 {
     for (int entryIndex = 0; entryIndex < logEntries.Length; entryIndex++)
     {
         LogEntry logEntry     = logEntries[entryIndex];
         byte[]   addressBytes = logEntry.LoggersAddress.Bytes;
         Set(addressBytes, blockBloom);
         for (int topicIndex = 0; topicIndex < logEntry.Topics.Length; topicIndex++)
         {
             Keccak topic = logEntry.Topics[topicIndex];
             Set(topic.Bytes, blockBloom);
         }
     }
 }
示例#4
0
 public BloomStructRef(LogEntry[] logEntries, Bloom blockBloom = null)
 {
     Bytes = new byte[ByteLength];
     Add(logEntries, blockBloom);
 }