Replace named timestamping authority with notary

As the timestamping authority is now always the notary service, contracts should
no longer be using name-based lookup of the timestamping authority (as this will
generally be wrong). This introduces a new "timestamp" property on a transaction,
and updates most contracts to refer to it.

In some cases (IRS, CommercialPaper) there are transactions with no input states
to derive notary from, that use timestamps. In these cases a notary is specified
in the command.
This commit is contained in:
Ross Nicoll
2016-07-06 11:55:59 +01:00
parent ae2e6ab917
commit 6b775ebd4d
9 changed files with 60 additions and 33 deletions

View File

@ -481,7 +481,7 @@ class TwoPartyTradeProtocolTests {
output("alice's paper") {
CommercialPaper.State(MEGA_CORP.ref(1, 2, 3), owner, amount, TEST_TX_TIME + 7.days)
}
command(MEGA_CORP_PUBKEY) { CommercialPaper.Commands.Issue() }
command(MEGA_CORP_PUBKEY) { CommercialPaper.Commands.Issue(notary) }
if (!withError)
timestamp(time = TEST_TX_TIME, notary = notary.owningKey)
if (attachmentID != null)