@Test public void shouldNotSplitWithWrongOriginSerialize() throws Exception { Contract c = createCoin(); c.addSignerKeyFromFile(PRIVATE_KEY_PATH); sealCheckTrace(c, true); Contract c2 = c.split(1)[0]; sealCheckTrace(c2, true); Binder sd2 = DefaultBiMapper.serialize(c2); Binder state = (Binder) sd2.get("state"); assertNotNull(state); assertTrue(state.size() > 0); HashId origin = HashId.withDigest(Do.randomNegativeBytes(64)); Binder originB = DefaultBiMapper.serialize(origin); state.set("origin", originB); Contract dc2 = DefaultBiMapper.deserialize(sd2); sealCheckTrace(dc2, false); state.remove("origin"); Contract dc3 = DefaultBiMapper.deserialize(sd2); sealCheckTrace(dc3, false); }
@Override public void deserialize(Binder data, BiDeserializer deserializer) { super.deserialize(data, deserializer); initFromParams(); }
SplitJoinPermission extends Permission { @Override public void deserialize(Binder data, BiDeserializer deserializer) { super.deserialize(data, deserializer); initFromParams(); } }
SplitJoinPermission extends Permission { @Override public void deserialize(Binder data, BiDeserializer deserializer) { super.deserialize(data, deserializer); initFromParams(); } SplitJoinPermission(Role role, Binder params); private  SplitJoinPermission(); }
SplitJoinPermission extends Permission { @Override public void deserialize(Binder data, BiDeserializer deserializer) { super.deserialize(data, deserializer); initFromParams(); } SplitJoinPermission(Role role, Binder params); private  SplitJoinPermission(); @Override void deserialize(Binder data, BiDeserializer deserializer); @Override void checkChangesQuantized(Contract contract, Contract changed, Map<String, Delta> stateChanges, Set<Contract> revokingItems, Collection<PublicKey> keys); boolean validateMergeFields(Contract changed, Contract c); }
SplitJoinPermission extends Permission { @Override public void deserialize(Binder data, BiDeserializer deserializer) { super.deserialize(data, deserializer); initFromParams(); } SplitJoinPermission(Role role, Binder params); private  SplitJoinPermission(); @Override void deserialize(Binder data, BiDeserializer deserializer); @Override void checkChangesQuantized(Contract contract, Contract changed, Map<String, Delta> stateChanges, Set<Contract> revokingItems, Collection<PublicKey> keys); boolean validateMergeFields(Contract changed, Contract c);  }