Refactored NotaryChangeProtocol and tests: moved the proposal verification step into the protocol.

Added another proposal verification step in the NotaryChangeProtocol.
Added the cause exception message to the 'notary change refused' error.
This commit is contained in:
Andrius Dagys
2016-06-14 19:06:44 +01:00
parent 0a5b7ace35
commit 30ca340b6e
12 changed files with 182 additions and 107 deletions

View File

@ -164,7 +164,7 @@ class Cash : FungibleAsset<Currency>() {
throw InsufficientBalanceException(amount - gatheredAmount)
val change = if (takeChangeFrom != null && gatheredAmount > amount) {
Amount<Issued<Currency>>(gatheredAmount.quantity - amount.quantity, takeChangeFrom.state.state.issuanceDef)
Amount<Issued<Currency>>(gatheredAmount.quantity - amount.quantity, takeChangeFrom.state.data.issuanceDef)
} else {
null
}