mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-06 06:06:49 +00:00

* Make MaxBlockLevel a DAG params instead of a constant. * Change the testnet network name to 9. * Fix TestBlockWindow. * Set MaxBlockLevels for non-mainnet networks to 250. * Revert "Fix TestBlockWindow." This reverts commit 30a7892f53e0bb8d0d24435a68f0561a8efab575. * Fix TestPruning.
39 lines
1.3 KiB
Go
39 lines
1.3 KiB
Go
package constants
|
|
|
|
import "math"
|
|
|
|
const (
|
|
// MaxBlockVersion represents the current version of blocks mined and the maximum block version
|
|
// this node is able to validate
|
|
MaxBlockVersion uint16 = 0
|
|
|
|
// 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 = 21_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
|
|
)
|