-
Notifications
You must be signed in to change notification settings - Fork 1
/
constants.go
41 lines (30 loc) · 1.43 KB
/
constants.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
34
35
36
37
38
39
40
41
package constants
import "math"
const (
// BlockVersion represents the current block version
BlockVersion uint16 = 1
// MaxTransactionVersion is the current latest supported transaction version.
MaxTransactionVersion uint16 = 0
// MaxScriptPublicKeyVersion is the current latest supported public key script version.
MaxScriptPublicKeyVersion uint16 = 0
// SompiPerKaspa is the number of sompi in one kaspa (1 KAS).
SompiPerKaspa = 100_000_000
// MaxSompi is the maximum transaction amount allowed in sompi.
MaxSompi = uint64(4_961_000_000 * SompiPerKaspa)
// MaxTxInSequenceNum is the maximum sequence number the sequence field
// of a transaction input can be.
MaxTxInSequenceNum uint64 = math.MaxUint64
// SequenceLockTimeDisabled is a flag that if set on a transaction
// input's sequence number, the sequence number will not be interpreted
// as a relative locktime.
SequenceLockTimeDisabled uint64 = 1 << 63
// SequenceLockTimeMask is a mask that extracts the relative locktime
// when masked against the transaction input sequence number.
SequenceLockTimeMask uint64 = 0x00000000ffffffff
// LockTimeThreshold is the number below which a lock time is
// interpreted to be a DAA score.
LockTimeThreshold = 5e11 // Tue Nov 5 00:53:20 1985 UTC
// UnacceptedDAAScore is used to for UTXOEntries that were created by transactions in the mempool, or otherwise
// not-yet-accepted transactions.
UnacceptedDAAScore = math.MaxUint64
)