Skip to content

Commit

Permalink
fix previous constant preservation on ergo tree deserialization;
Browse files Browse the repository at this point in the history
  • Loading branch information
greenhat committed Jan 31, 2019
1 parent 696f9f1 commit b15fcf7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b15fcf7

Please sign in to comment.