diff --git a/core/src/main/kotlin/net/corda/core/transactions/TransactionBuilder.kt b/core/src/main/kotlin/net/corda/core/transactions/TransactionBuilder.kt index 71fb6c728b..c05f378223 100644 --- a/core/src/main/kotlin/net/corda/core/transactions/TransactionBuilder.kt +++ b/core/src/main/kotlin/net/corda/core/transactions/TransactionBuilder.kt @@ -741,9 +741,11 @@ open class TransactionBuilder( addReferenceState(resolvedStateAndRef.referenced()) } } else { - log.warn("WARNING: You must pass in a ServiceHub reference to TransactionBuilder to resolve " + - "state pointers outside of flows. If you are writing a unit test then pass in a " + - "MockServices instance.") + if (nextStatePointer.isResolved) { + log.warn("WARNING: You must pass in a ServiceHub reference to TransactionBuilder to resolve " + + "state pointers outside of flows. If you are writing a unit test then pass in a " + + "MockServices instance.") + } return } }