Skip to content

Commit

Permalink
Test removing the restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed Jan 18, 2020
1 parent 35924a3 commit e9415a6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions definitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const (
NetworkStn NetworkType = "stn"

// MaxTransactionsUTXO is the max allowed in the request
// todo: this is a guess
MaxTransactionsUTXO int = 20
)

Expand Down
8 changes: 6 additions & 2 deletions transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,14 @@ func (c *Client) GetTxsByHashes(hashes *TxHashes) (txList TxList, err error) {
if len(hashes.TxIDs) == 0 {
err = fmt.Errorf("missing hashes")
return
} else if len(hashes.TxIDs) > MaxTransactionsUTXO {
}

// Testing turning off the limit
// todo: turn back on when limit is known
/*else if len(hashes.TxIDs) > MaxTransactionsUTXO {
err = fmt.Errorf("max limit of utxos is %d and you sent %d", MaxTransactionsUTXO, len(hashes.TxIDs))
return
}
}*/

// Hashes into json
var postData []byte
Expand Down

0 comments on commit e9415a6

Please sign in to comment.