Esempio n. 1
0
        public void TryGetExecutedCache_Test()
        {
            var blockStateSet = new BlockStateSet();

            blockStateSet.TryGetExecutedCache("key1", out var value).ShouldBeFalse();

            blockStateSet.BlockExecutedData.Add("key1", ByteString.CopyFromUtf8("key1"));
            blockStateSet.TryGetExecutedCache("key1", out value).ShouldBeTrue();
            value.ShouldBe(ByteString.CopyFromUtf8("key1"));
        }
 protected override bool TryGetFromBlockStateSet(BlockStateSet blockStateSet, string key, out ByteString value)
 {
     value = null;
     return(blockStateSet != null && blockStateSet.TryGetExecutedCache(key, out value));
 }