0

在我的 Corda 4.1 安装中,我使用签名约束并希望在我的状态中添加一个新字段“测试”。添加它并在我尝试查询我的保管库时更新我的​​cordapp后,我收到以下错误:

"VaultQueryException - An error occurred while attempting to query the vault: Failed to deserialise group OUTPUTS_GROUP at index 0 in transaction: Cannot construct evolution serializer for remote type sg.tradecloud.contracts.states.company.properties.Company: Mandatory property test of local type is not present in remote type. This implies the type has not evolved in a backwards compatible way. Consider making test nullable in the newer version of this type.

我有什么选择来解决这个问题?我应该让“测试”为空吗?我应该做明确的状态更新吗?或者还有其他我可以解决的吗?

4

1 回答 1

1

您应该将引入的新字段设置为可为空的。除非您将新添加的字段设为可空,否则 Corda 将无法反序列化旧发布的状态。

于 2019-09-18T13:31:17.537 回答