mirror of
https://github.com/corda/corda.git
synced 2024-12-24 07:06:44 +00:00
Replace wire transaction with signed transaction
This commit is contained in:
parent
14c38a6fce
commit
a9eedd92fd
@ -4,21 +4,24 @@ import net.corda.core.contracts.Attachment
|
||||
import net.corda.core.contracts.ContractState
|
||||
import net.corda.core.contracts.StateAndRef
|
||||
import net.corda.core.node.NetworkParameters
|
||||
import net.corda.core.serialization.CordaSerializable
|
||||
import net.corda.core.transactions.SignedTransaction
|
||||
import net.corda.core.transactions.WireTransaction
|
||||
|
||||
/**
|
||||
* Enclave representation of a ledger transaction.
|
||||
* ConclaveLedgerTxModel wraps a [WireTransaction] and additional properties to allow an enclave to reconstruct and
|
||||
* Enclave representation of a signed and ledger transaction.
|
||||
* ConclaveLedgerTxModel wraps a [SignedTransaction] and additional properties to allow an enclave to reconstruct and
|
||||
* verify a ledger transaction.
|
||||
* @property wireTransaction a serializable transaction without signatures.
|
||||
* @property signedTransaction a serializable transaction with signatures.
|
||||
* @property inputStates an array of input states that will be consumed by the wrapped transaction.
|
||||
* @property attachments an array of attachment objects that are required for this transaction to verify.
|
||||
* @property networkParameters the network parameters that were in force when the enclosed wire transaction was
|
||||
* constructed.
|
||||
* @property references an array of reference states.
|
||||
*/
|
||||
@CordaSerializable
|
||||
data class ConclaveLedgerTxModel(
|
||||
val wireTransaction: WireTransaction,
|
||||
val signedTransaction: SignedTransaction,
|
||||
val inputStates: Array<StateAndRef<ContractState>>,
|
||||
val attachments: Array<Attachment>,
|
||||
val networkParameters: NetworkParameters,
|
||||
@ -30,7 +33,7 @@ data class ConclaveLedgerTxModel(
|
||||
|
||||
other as ConclaveLedgerTxModel
|
||||
|
||||
if (wireTransaction != other.wireTransaction) return false
|
||||
if (signedTransaction != other.signedTransaction) return false
|
||||
if (!inputStates.contentEquals(other.inputStates)) return false
|
||||
if (!attachments.contentEquals(other.attachments)) return false
|
||||
if (networkParameters != other.networkParameters) return false
|
||||
@ -40,7 +43,7 @@ data class ConclaveLedgerTxModel(
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
var result = wireTransaction.hashCode()
|
||||
var result = signedTransaction.hashCode()
|
||||
result = 31 * result + inputStates.contentHashCode()
|
||||
result = 31 * result + attachments.contentHashCode()
|
||||
result = 31 * result + networkParameters.hashCode()
|
||||
|
Loading…
Reference in New Issue
Block a user