Skip to content

Commit

Permalink
Fix schema parsing in test
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Richardson <[email protected]>
  • Loading branch information
awrichar committed Dec 9, 2024
1 parent a20a736 commit f8d5197
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,15 @@ void testCSDBond() throws Exception {
List<JsonNode> notoSchemas = testbed.getRpcClient().request("pstate_listSchemas",
"noto");
assertEquals(2, notoSchemas.size());
var notoSchema = mapper.convertValue(notoSchemas.getLast(), StateSchema.class);
assertEquals("type=NotoCoin(bytes32 salt,string owner,uint256 amount),labels=[owner,amount]",
notoSchema.signature());
StateSchema notoSchema = null;
for (var i = 0; i < 2; i++) {
var schema = mapper.convertValue(notoSchemas.get(i), StateSchema.class);
if (schema.signature().equals("type=NotoCoin(bytes32 salt,string owner,uint256 amount),labels=[owner,amount]")) {
notoSchema = schema;
} else {
assertEquals("type=TransactionData(bytes32 salt,bytes data),labels=[]", schema.signature());
}
}

GroupTupleJSON issuerGroup = new GroupTupleJSON(
JsonHex.randomBytes32(), new String[]{bondIssuer});
Expand Down

0 comments on commit f8d5197

Please sign in to comment.