Esempio n. 1
0
 public bool TryGetKnownHeaderNode(UInt256?blockHash, [MaybeNullWhen(false)] out HeaderNode node)
 {
     //using var readLock = new ReadLock(this.theLock);
     using Microsoft.VisualStudio.Threading.AsyncReaderWriterLock.Releaser readMainLock = GlobalLocks.ReadOnMainAsync().GetAwaiter().GetResult();
     return(HeadersTree.TryGetNode(blockHash, false, out node));
 }
Esempio n. 2
0
 public bool TryGetBestChainHeaderNode(UInt256 blockHash, [MaybeNullWhen(false)] out HeaderNode node)
 {
     using Microsoft.VisualStudio.Threading.AsyncReaderWriterLock.Releaser readMainLock = GlobalLocks.ReadOnMainAsync().GetAwaiter().GetResult();
     return(HeadersTree.TryGetNode(blockHash, true, out node));
 }