File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
lib-impl/src/test/java/org/ergoplatform/appkit/impl Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,24 @@ class MultisigAddressTests extends PropSpec with Matchers with ScalaCheckDrivenP
3838 }
3939 }
4040
41+ property(" address order stability" ) {
42+ // do create a multisig address, convert to Address and back
43+ forAll(thresholdGen, MinSuccessful (50 )) { threshold : CTHRESHOLD =>
44+ val addresses = threshold.children.map(Address .fromSigmaBoolean(_, NetworkType .MAINNET ))
45+ val multisigAddress = MultisigAddress .buildFromParticipants(
46+ threshold.k,
47+ addresses.asJava,
48+ NetworkType .MAINNET )
49+
50+ val multisigAddress2 = MultisigAddress .buildFromParticipants(
51+ threshold.k,
52+ addresses.reverse.asJava,
53+ NetworkType .MAINNET )
54+
55+ multisigAddress.getAddress shouldBe multisigAddress2.getAddress
56+ }
57+ }
58+
4159 property(" fromAddress negative" ) {
4260 // check that fromAddress fails on non-P2S addresses
4361 forAll(proveDlogGen) { dlog : ProveDlog =>
You can’t perform that action at this time.
0 commit comments