-
Notifications
You must be signed in to change notification settings - Fork 29
/
vars.go
33 lines (24 loc) · 903 Bytes
/
vars.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package transaction
import (
"errors"
"github.com/0chain/gosdk/core/conf"
)
var (
// Config
cfg *conf.Config
)
// SetConfig set config variables for transaction
func SetConfig(c *conf.Config) {
cfg = c
}
var (
ErrInvalidRequest = errors.New("[txn] invalid request")
// ErrNoAvailableSharder no any available sharder
ErrNoAvailableSharder = errors.New("[txn] there is no any available sharder")
// ErrNoTxnDetail No transaction detail was found on any of the sharders
ErrNoTxnDetail = errors.New("[txn] no transaction detail was found on any of the sharders")
// ErrTooLessConfirmation too less sharder to confirm transaction
ErrTooLessConfirmation = errors.New("[txn] too less sharders to confirm it")
// ErrConfigIsNotInitialized config is not initialized
ErrConfigIsNotInitialized = errors.New("[txn] config is not initialized. please initialize it by transaction.SetConfig")
)