Мне нужно несколько узлов для построения одной транзакции.Чтобы добиться этого, я создаю TransactionBuilder
и передаю его узлам, которые затем добавляют в него свои состояния.
Это кажется законной практикой, поскольку в официальной документации упоминается [TransactionBuilder] is intended to be passed around contracts that may edit it by adding new states/commands.
Однако при запуске модульного теста сеть выдает это исключение:
Class class net.corda.core.transactions.TransactionBuilder is not on the whitelist or annotated with @CordaSerializable.
java.io.NotSerializableException: Class class net.corda.core.transactions.TransactionBuilder is not on the whitelist or annotated with @CordaSerializable.
Я пробовал белый список TransactionBuilder
, но он выкинул это:
net.corda.core.transactions.TransactionBuilder -> outputs(java.util.List<net.corda.core.contracts.TransactionState<net.corda.core.contracts.ContractState>>) -> java.util.List<net.corda.core.contracts.TransactionState<net.corda.core.contracts.ContractState>> -> net.corda.core.contracts.TransactionState<net.corda.core.contracts.ContractState> -> data(net.corda.core.contracts.ContractState) -> state(com.luxoft.poc.mobi.data.state.TransportAgreement$State) -> Class class com.luxoft.poc.mobi.data.state.TransportAgreement$State is not on the whitelist or annotated with @CordaSerializable.
java.io.NotSerializableException: net.corda.core.transactions.TransactionBuilder -> outputs(java.util.List<net.corda.core.contracts.TransactionState<net.corda.core.contracts.ContractState>>) -> java.util.List<net.corda.core.contracts.TransactionState<net.corda.core.contracts.ContractState>> -> net.corda.core.contracts.TransactionState<net.corda.core.contracts.ContractState> -> data(net.corda.core.contracts.ContractState) -> state(com.luxoft.poc.mobi.data.state.TransportAgreement$State) -> Class class com.luxoft.poc.mobi.data.state.TransportAgreement$State is not on the whitelist or annotated with @CordaSerializable.
Что я делаю не так?Как мне обойти это?
Мы используем Corda 3.3