|
|
@ -17,6 +17,13 @@ class ScriptPubKeySpec extends WordSpec with MustMatchers with OptionValues { |
|
|
|
result.value mustEqual expected |
|
|
|
} |
|
|
|
|
|
|
|
"support more than 4 values if we have the addresses" in { |
|
|
|
val script = ScriptPubKey("nulldata", "OP_RETURN 586a55587938507a55464d78534c37594135767866574a587365746b354d5638676f 58794a4338786e664672484e634d696e68366778755052595939484361593944416f 99 1f60a6a385a4e5163ffef65dd873f17452bb0d9f89da701ffcc5a0f72287273c0571485c29123fef880d2d8169cfdb884bf95a18a0b36461517acda390ce4cf441", List.empty) |
|
|
|
|
|
|
|
val result = script.getTPoSAddresses |
|
|
|
result.nonEmpty mustEqual true |
|
|
|
} |
|
|
|
|
|
|
|
"fail if OP_RETURN is not present" in { |
|
|
|
val script = ScriptPubKey("nulldata", "OP_RTURN 5869337351664d51737932437a4d5a54726e4b573648464770315671465468644c77 58794a4338786e664672484e634d696e68366778755052595939484361593944416f 99", List.empty) |
|
|
|
|
|
|
@ -44,13 +51,5 @@ class ScriptPubKeySpec extends WordSpec with MustMatchers with OptionValues { |
|
|
|
val result = script.getTPoSAddresses |
|
|
|
result.isEmpty mustEqual true |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
"fail if there are more than 4 values" in { |
|
|
|
val script = ScriptPubKey("nulldata", "OP_RETURN 5869337351664d51737932437a4d5a54726e4b573648464770315671465468644c77 58794a4338786e664672484e634d696e68366778755052595939484361593944416f 99 x", List.empty) |
|
|
|
|
|
|
|
val result = script.getTPoSAddresses |
|
|
|
result.isEmpty mustEqual true |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|