mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
Merge pull request #322 from hermeznetwork/feature/integration20
Advance coordinator implementation
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
package common
|
||||
|
||||
import "errors"
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/hermeznetwork/tracerr"
|
||||
)
|
||||
|
||||
// ErrNotInFF is used when the *big.Int does not fit inside the Finite Field
|
||||
var ErrNotInFF = errors.New("BigInt not inside the Finite Field")
|
||||
@@ -16,3 +20,14 @@ var ErrIdxOverflow = errors.New("Idx overflow, max value: 2**48 -1")
|
||||
|
||||
// ErrBatchQueueEmpty is used when the coordinator.BatchQueue.Pop() is called and has no elements
|
||||
var ErrBatchQueueEmpty = errors.New("BatchQueue empty")
|
||||
|
||||
// ErrTODO is used when a function is not yet implemented
|
||||
var ErrTODO = errors.New("TODO")
|
||||
|
||||
// ErrDone is used when a function returns earlier due to a cancelled context
|
||||
var ErrDone = errors.New("done")
|
||||
|
||||
// IsErrDone returns true if the error or wrapped (with tracerr) error is ErrDone
|
||||
func IsErrDone(err error) bool {
|
||||
return tracerr.Unwrap(err) == ErrDone
|
||||
}
|
||||
|
||||
@@ -6,6 +6,12 @@ import (
|
||||
ethCommon "github.com/ethereum/go-ethereum/common"
|
||||
)
|
||||
|
||||
const (
|
||||
// AuctionErrMsgCannotForge is the message returned in forge with the
|
||||
// address cannot forge
|
||||
AuctionErrMsgCannotForge = "HermezAuctionProtocol::forge: CANNOT_FORGE"
|
||||
)
|
||||
|
||||
// AuctionConstants are the constants of the Rollup Smart Contract
|
||||
type AuctionConstants struct {
|
||||
// Blocks per slot
|
||||
|
||||
Reference in New Issue
Block a user