Browse Source

Clarify where the custom errors are used

tags/v1.4.0
codesoap 1 month ago
parent
commit
5a544e5800
2 changed files with 4 additions and 0 deletions
  1. 2
    0
      account.go
  2. 2
    0
      block.go

+ 2
- 0
account.go View File

@@ -79,6 +79,8 @@ func getAddress(publicKey *big.Int) (string, error) {
// and ensuring that no fields have been changed in the account_info
// response.
//
// May return ErrAccountNotFound or ErrAccountManipulated.
//
// If ErrAccountNotFound is returned, FirstReceive can be used to
// create a first Block and AccountInfo and create the account by then
// submitting this Block.

+ 2
- 0
block.go View File

@@ -179,6 +179,8 @@ func (b Block) hashBytes() ([]byte, error) {

// Submit submits the Block to the given node. Work and Signature of b
// must be populated beforehand.
//
// May return ErrWorkMissing or ErrSignatureMissing.
func (b Block) Submit(node string) error {
if b.Work == "" {
return ErrWorkMissing

Loading…
Cancel
Save