Browse Source

Refactor for compactness

xno
codesoap 2 years ago
parent
commit
86c2fcba94
  1. 3
      block.go
  2. 3
      process.go

3
block.go

@ -141,8 +141,7 @@ func (b *block) addWork(workThreshold uint64, privateKey *big.Int) error { @@ -141,8 +141,7 @@ func (b *block) addWork(workThreshold uint64, privateKey *big.Int) error {
return err
}
var response workGenerateResponse
err = json.Unmarshal(responseBytes, &response)
if err != nil {
if err = json.Unmarshal(responseBytes, &response); err != nil {
return err
}
// Need to check pending.Error because of

3
process.go

@ -27,8 +27,7 @@ func doProcessRPCCall(process process) error { @@ -27,8 +27,7 @@ func doProcessRPCCall(process process) error {
return err
}
var processResponse processResponse
err = json.Unmarshal(responseBytes, &processResponse)
if err != nil {
if err = json.Unmarshal(responseBytes, &processResponse); err != nil {
return err
}
// Need to check pending.Error because of

Loading…
Cancel
Save