Browse Source

Fix error response comments

xno
codesoap 2 years ago
parent
commit
86190ae3a8
  1. 2
      block.go
  2. 2
      process.go

2
block.go

@ -126,7 +126,7 @@ func (b *block) addWork(workThreshold uint64, privateKey *big.Int) error { @@ -126,7 +126,7 @@ func (b *block) addWork(workThreshold uint64, privateKey *big.Int) error {
if err = json.Unmarshal(responseBytes, &response); err != nil {
return err
}
// Need to check pending.Error because of
// Need to check response.Error because of
// https://github.com/nanocurrency/nano-node/issues/1782.
if response.Error != "" {
return fmt.Errorf("could not get work for block: %s", response.Error)

2
process.go

@ -30,7 +30,7 @@ func doProcessRPC(process process) error { @@ -30,7 +30,7 @@ func doProcessRPC(process process) error {
if err = json.Unmarshal(responseBytes, &processResponse); err != nil {
return err
}
// Need to check pending.Error because of
// Need to check processResponse.Error because of
// https://github.com/nanocurrency/nano-node/issues/1782.
if processResponse.Error != "" {
err = fmt.Errorf("could not publish block: %s", processResponse.Error)

Loading…
Cancel
Save