Skip to content

Commit

Permalink
Misc Bug Fixes, Efficiency Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Dev-JamesR committed Feb 11, 2021
1 parent 7cb06ca commit 9982ade
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
15 changes: 11 additions & 4 deletions ethofs/blockchain.go
Expand Up @@ -18,22 +18,29 @@ import (

var pinResponseFlag = false
var pinResponseCount = uint64(10)
var ethClient *ethclient.Client

func checkPinResponse(pinNumber uint64) {
if pinNumber >= pinResponseCount {
pinResponseFlag = false
}
}

func initializeEthClient() error {
c, err := ethclient.Dial(ipcLocation)
if err != nil {
return err
}
ethClient = c
return nil
}

func updatePinContractValues() error {
if(pinResponseFlag) {
return nil // Returning as pin response collection still in process
}

c, err := ethclient.Dial(ipcLocation)
if err != nil {
return err
}
c := ethClient

address := common.HexToAddress("0xD3b80c611999D46895109d75322494F7A49D742F")
contract, err := NewPinStorage(address, c)
Expand Down
5 changes: 5 additions & 0 deletions ethofs/ethofs.go
Expand Up @@ -50,6 +50,11 @@ func InitializeEthofs(initFlag bool, configFlag bool, nodeType string, blockComm
ipcLocation = defaultDataDir + "/geth.ipc"
}

clientErr := initializeEthClient()
if clientErr != nil {
os.Exit(0)
}

if initFlag {

log.Info("Starting ethoFS repo initialization")
Expand Down
2 changes: 1 addition & 1 deletion params/version.go
Expand Up @@ -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 = 4 // Patch version component of the current release
VersionPatch = 5 // Patch version component of the current release
VersionMeta = "Ether1-Kepler" // Version metadata to append to the version string
)

Expand Down

0 comments on commit 9982ade

Please sign in to comment.