Merged in clint-vegacorechanges (pull request #380)

Corda Changes required for Vega
This commit is contained in:
Clinton Alexander
2016-09-28 16:28:15 +01:00
21 changed files with 64 additions and 73 deletions

View File

@ -262,7 +262,7 @@ class NodeSchedulerServiceTest : SingletonSerializeAsToken() {
private fun scheduleTX(instant: Instant, increment: Int = 1): ScheduledStateRef? {
var scheduledRef: ScheduledStateRef? = null
apply {
val freshKey = services.keyManagementService.freshKey()
val freshKey = services.storageService.myLegalIdentityKey
val state = TestState(factory.create(TestProtocolLogic::class.java, increment), instant)
val usefulTX = TransactionType.General.Builder(null).apply {
addOutputState(state, DUMMY_NOTARY)

View File

@ -84,7 +84,7 @@ class VaultWithCashTest {
fun `issue and spend total correctly and irrelevant ignored`() {
databaseTransaction(database) {
// A tx that sends us money.
val freshKey = services.keyManagementService.freshKey()
val freshKey = services.storageService.myLegalIdentityKey
val usefulTX = TransactionType.General.Builder(null).apply {
Cash().generateIssue(this, 100.DOLLARS `issued by` MEGA_CORP.ref(1), freshKey.public, DUMMY_NOTARY)
signWith(MEGA_CORP_KEY)
@ -122,7 +122,7 @@ class VaultWithCashTest {
@Test
fun `branching LinearStates fails to verify`() {
databaseTransaction(database) {
val freshKey = services.keyManagementService.freshKey()
val freshKey = services.storageService.myLegalIdentityKey
val linearId = UniqueIdentifier()
// Issue a linear state
@ -142,7 +142,7 @@ class VaultWithCashTest {
@Test
fun `sequencing LinearStates works`() {
databaseTransaction(database) {
val freshKey = services.keyManagementService.freshKey()
val freshKey = services.storageService.myLegalIdentityKey
val linearId = UniqueIdentifier()