samples-kotlin
samples-kotlin copied to clipboard
Demonstrate How To Verify Signers With Accounts
The tictacthor sample has a commented out section where the signer verification should be https://github.com/corda/samples-kotlin/blob/master/Accounts/tictacthor/contracts/src/main/kotlin/net/corda/samples/tictacthor/contracts/BoardContract.kt#L54-L56
// Signatures
// TODO: Should only the initiating party sign?
//"Both participants must sign a SubmitTurn transaction." using (command.signers == outputBoardState.participants.map { it.owningKey })
You need to take into consideration that there could be multiple accounts on multiple nodes and any of the accounts could be transacting with each other so checking the host.owningKey isn't a valid check as that could allow an account to transact with itself.
The other issue is that the AccountSDK keys change all the time. https://github.com/corda/accounts/issues/50