Minor: yet another small move

This commit is contained in:
Mike Hearn 2016-03-08 11:12:45 +01:00
parent bf3aed11e7
commit 8d041a6b1a
7 changed files with 16 additions and 24 deletions

View File

@ -13,8 +13,8 @@ import core.crypto.DigitalSignature
import core.crypto.SecureHash
import core.crypto.signWithECDSA
import core.crypto.toStringShort
import core.node.TimestampingError
import core.node.services.TimestamperService
import core.node.services.TimestampingError
import core.serialization.SerializedBytes
import core.serialization.deserialize
import core.serialization.serialize

View File

@ -1,15 +0,0 @@
package core.node
sealed class TimestampingError : Exception() {
class RequiresExactlyOneCommand : TimestampingError()
/**
* Thrown if an attempt is made to timestamp a transaction using a trusted timestamper, but the time on the
* transaction is too far in the past or future relative to the local clock and thus the timestamper would reject
* it.
*/
class NotOnTimeException : TimestampingError()
/** Thrown if the command in the transaction doesn't list this timestamping authorities public key as a signer */
class NotForMe : TimestampingError()
}

View File

@ -37,3 +37,16 @@ object DummyTimestampingAuthority {
val key = generateKeyPair()
val identity = Party("Mock Company 0", key.public)
}
sealed class TimestampingError : Exception() {
class RequiresExactlyOneCommand : TimestampingError()
/**
* Thrown if an attempt is made to timestamp a transaction using a trusted timestamper, but the time on the
* transaction is too far in the past or future relative to the local clock and thus the timestamper would reject
* it.
*/
class NotOnTimeException : TimestampingError()
/** Thrown if the command in the transaction doesn't list this timestamping authorities public key as a signer */
class NotForMe : TimestampingError()
}

View File

@ -17,8 +17,6 @@ import core.messaging.LegallyIdentifiableNode
import core.messaging.MessageRecipients
import core.messaging.MessagingService
import core.messaging.StateMachineManager
import core.node.TimestampingError
import core.node.services.TimestamperService
import core.protocols.ProtocolLogic
import core.serialization.SerializedBytes
import core.serialization.deserialize

View File

@ -10,8 +10,8 @@ package contracts
import core.*
import core.crypto.SecureHash
import core.node.TimestampingError
import core.node.services.DummyTimestampingAuthority
import core.node.services.TimestampingError
import core.testutils.*
import org.junit.Test
import org.junit.runner.RunWith

View File

@ -12,7 +12,6 @@ import core.crypto.*
import core.messaging.MessagingService
import core.messaging.MockNetworkMap
import core.messaging.NetworkMap
import core.node.TimestampingError
import core.node.services.*
import core.serialization.SerializedBytes
import core.serialization.deserialize

View File

@ -12,10 +12,7 @@ import co.paralleluniverse.fibers.Suspendable
import core.*
import core.crypto.SecureHash
import core.messaging.*
import core.node.services.ServiceHub
import core.node.services.TimestamperNodeService
import core.node.services.TimestampingMessages
import core.node.services.TimestampingProtocol
import core.node.services.*
import core.protocols.ProtocolLogic
import core.serialization.serialize
import core.testutils.ALICE