diff --git a/core/blockchain_insert.go b/core/blockchain_insert.go index e0ee34871..8b79c903a 100644 --- a/core/blockchain_insert.go +++ b/core/blockchain_insert.go @@ -27,6 +27,7 @@ import ( // block communication channel declaration var blockCommunication chan<- *types.Block +var isInitialized = false // insertStats tracks and reports on block insertion. type insertStats struct { @@ -76,7 +77,7 @@ func (st *insertStats) report(chain []*types.Block, index int, dirty common.Stor } log.Info("Imported new chain segment", context...) - if len(chain) == 1 { + if isInitialized && len(chain) == 1 { //ethofs.NewBlock(chain[0]) // ethoFS new block event handler sendNewBlockCommunication(chain[0]) } @@ -89,6 +90,7 @@ func (st *insertStats) report(chain []*types.Block, index int, dirty common.Stor // Initialize new block comms func InitializeBlockCommunication(newBlockReceiptChannel chan<- *types.Block) { blockCommunication = newBlockReceiptChannel + isInitialized = true } // Send new block using comms diff --git a/ethofs/ethofs.go b/ethofs/ethofs.go index e3147ca23..35141fa1b 100644 --- a/ethofs/ethofs.go +++ b/ethofs/ethofs.go @@ -28,6 +28,11 @@ var contractControllerAddress = common.HexToAddress("0xc38B47169950D8A28bC77a6Fa var mainChannelString = "ethoFSPinningChannel_alpha11" var defaultDataDir string var ipcLocation string +var isInitialized = false + +func IsInitialized() bool { + return isInitialized +} func InitializeEthofs(initFlag bool, configFlag bool, nodeType string, blockCommunication chan *types.Block) { diff --git a/node/node.go b/node/node.go index 46c1eb75c..8566e2b94 100644 --- a/node/node.go +++ b/node/node.go @@ -56,7 +56,7 @@ const logo = ` ,,,,,, ,,,,,,,,, ,,,,, ,,,,,,,, ,,,, ,,,,,, - ,, ,,,, Kepler v1.4.1 + ,, ,,,, Kepler v1.4.2 ,, ethoFS Enabled Node , ` diff --git a/params/version.go b/params/version.go index 2e8bf77c1..b97c48b53 100644 --- a/params/version.go +++ b/params/version.go @@ -23,7 +23,7 @@ import ( const ( VersionMajor = 1 // Major version component of the current release VersionMinor = 4 // Minor version component of the current release - VersionPatch = 1 // Patch version component of the current release + VersionPatch = 2 // Patch version component of the current release VersionMeta = "Ether1-Kepler" // Version metadata to append to the version string )