Minor: use DummyTimestampingAuthority key/identity in the InMemoryNetwork

This commit is contained in:
Mike Hearn 2016-02-12 16:50:44 +01:00
parent b7fd0ce0ed
commit a01746a04b

View File

@ -11,8 +11,7 @@ package core.messaging
import com.google.common.util.concurrent.Futures
import com.google.common.util.concurrent.ListenableFuture
import com.google.common.util.concurrent.MoreExecutors
import core.Party
import core.crypto.generateKeyPair
import core.DummyTimestampingAuthority
import core.crypto.sha256
import core.node.TimestamperNodeService
import core.utilities.loggerFor
@ -126,10 +125,8 @@ public class InMemoryNetwork {
check(timestampingAdvert == null)
val (handle, builder) = createNode(manuallyPumped)
val node = builder.start().get()
val key = generateKeyPair()
val identity = Party("Unit test timestamping authority", key.public)
TimestamperNodeService(node, identity, key)
timestampingAdvert = LegallyIdentifiableNode(handle, identity)
TimestamperNodeService(node, DummyTimestampingAuthority.identity, DummyTimestampingAuthority.key)
timestampingAdvert = LegallyIdentifiableNode(handle, DummyTimestampingAuthority.identity)
return Pair(timestampingAdvert!!, node)
}