From b15fcf7abb931fcb90aa22c3c17f29240430e389 Mon Sep 17 00:00:00 2001 From: Denys Zadorozhnyi Date: Thu, 31 Jan 2019 15:17:59 +0200 Subject: [PATCH] fix previous constant preservation on ergo tree deserialization; --- .../scala/sigmastate/serialization/ErgoTreeSerializer.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/sigmastate/serialization/ErgoTreeSerializer.scala b/src/main/scala/sigmastate/serialization/ErgoTreeSerializer.scala index e21c19a286..f1d29608f6 100644 --- a/src/main/scala/sigmastate/serialization/ErgoTreeSerializer.scala +++ b/src/main/scala/sigmastate/serialization/ErgoTreeSerializer.scala @@ -29,9 +29,9 @@ class ErgoTreeSerializer { def deserializeErgoTree(r: SigmaByteReader): ErgoTree = { val (h, cs) = deserializeHeader(r) + val previousConstantStore = r.constantStore r.constantStore = new ConstantStore(cs) // reader with constant store attached is required (to get tpe for a constant placeholder) - val previousConstantStore = r.constantStore val root = ValueSerializer.deserialize(r) r.constantStore = previousConstantStore ErgoTree(h, cs, root)