diff --git a/sigmastate/src/main/scala/org/ergoplatform/ErgoBoxCandidate.scala b/sigmastate/src/main/scala/org/ergoplatform/ErgoBoxCandidate.scala index 003bfbe977..9fa6cafaf0 100644 --- a/sigmastate/src/main/scala/org/ergoplatform/ErgoBoxCandidate.scala +++ b/sigmastate/src/main/scala/org/ergoplatform/ErgoBoxCandidate.scala @@ -100,14 +100,14 @@ class ErgoBoxCandidate(val value: Long, s"tokens: (${additionalTokens.map(t => ErgoAlgos.encode(t._1) + ":" + t._2).toArray.mkString(", ")}), " + s"$additionalRegisters, creationHeight: $creationHeight)" - /** Additional tokens stored in the box, merged into a Map */ + /** Additional tokens stored in the box, merged into a Map. + * This method is not used in ErgoTree and serialization, not part of consensus. + */ lazy val tokens: Map[ModifierId, Long] = { val merged = new mutable.HashMap[ModifierId, Long] - additionalTokens.foreach { - case (id, amount) => { - val mId = bytesToId(id) - merged.put(mId, java7.compat.Math.addExact(merged.getOrElse(mId, 0L), amount)) - } + additionalTokens.foreach { case (id, amount) => + val mId = bytesToId(id) + merged.put(mId, java7.compat.Math.addExact(merged.getOrElse(mId, 0L), amount)) } merged.toMap }