mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +00:00
Merge pull request #7642 from corda/shams-db-migration-net-params-bug
ENT-11340: Uninitialised network parameters during schema migration
This commit is contained in:
commit
e632a78776
@ -483,6 +483,7 @@ abstract class AbstractNode<S>(val configuration: NodeConfiguration,
|
||||
"Node's platform version is lower than network's required minimumPlatformVersion"
|
||||
}
|
||||
networkMapCache.start(netParams.notaries)
|
||||
services.networkParameters = netParams
|
||||
|
||||
database.transaction {
|
||||
networkParametersStorage.setCurrentParameters(signedNetParams, trustRoots)
|
||||
@ -1205,8 +1206,7 @@ abstract class AbstractNode<S>(val configuration: NodeConfiguration,
|
||||
override val attachmentsClassLoaderCache: AttachmentsClassLoaderCache get() = this@AbstractNode.attachmentsClassLoaderCache
|
||||
|
||||
@Volatile
|
||||
private lateinit var _networkParameters: NetworkParameters
|
||||
override val networkParameters: NetworkParameters get() = _networkParameters
|
||||
override lateinit var networkParameters: NetworkParameters
|
||||
|
||||
init {
|
||||
this@AbstractNode.attachments.servicesForResolution = this
|
||||
@ -1214,7 +1214,7 @@ abstract class AbstractNode<S>(val configuration: NodeConfiguration,
|
||||
|
||||
fun start(myInfo: NodeInfo, networkParameters: NetworkParameters) {
|
||||
this._myInfo = myInfo
|
||||
this._networkParameters = networkParameters
|
||||
this.networkParameters = networkParameters
|
||||
}
|
||||
|
||||
override fun <T : SerializeAsToken> cordaService(type: Class<T>): T {
|
||||
@ -1296,7 +1296,7 @@ abstract class AbstractNode<S>(val configuration: NodeConfiguration,
|
||||
}
|
||||
|
||||
override fun onNewNetworkParameters(networkParameters: NetworkParameters) {
|
||||
this._networkParameters = networkParameters
|
||||
this.networkParameters = networkParameters
|
||||
}
|
||||
|
||||
override fun tryExternalVerification(stx: SignedTransaction, checkSufficientSignatures: Boolean): Boolean {
|
||||
|
Loading…
Reference in New Issue
Block a user