mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-20 05:46:44 +00:00

* [NOD-237] Implemented transaction mass. * [NOD-237] Added transaction mass validation to the mempool. * [NOD-237] Made blockMaxMassMax not rely on MaxBlockPayload. * [NOD-237] Added comments describing the new constants in validate.go. * [NOD-237] Changed the default blockmaxmass to 10,000,000. * [NOD-237] Fixed a comment that erroneously didn't refer to mass. * [NOD-237] Added comments to ValidateTxMass and CalcTxMass. * [NOD-237] Renamed "size" to "byte". Made validateBlockMass exit early if validation fails. Fixed unit names in comments. In CalcTxMass, moved summing of mass to the bottom of the function. * [NOD-237] Instead of ErrMassTooHigh, renamed ErrBlockTooBig and ErrTxTooBig. Replaced wire.MaxBlockPayload with MaxMassPerBlock. * [NOD-237] Fixed sanity checks related to block size in commands. * [NOD-237] To use up less memory during testing, made the mass in the "too big" test come from pkScripts rather than input bytes. * [NOD-237] Added an overflow check to validateBlockMass.
15 lines
523 B
Go
15 lines
523 B
Go
// Copyright (c) 2014-2016 The btcsuite developers
|
|
// Use of this source code is governed by an ISC
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package mining
|
|
|
|
// Policy houses the policy (configuration parameters) which is used to control
|
|
// the generation of block templates. See the documentation for
|
|
// NewBlockTemplate for more details on each of these parameters are used.
|
|
type Policy struct {
|
|
// BlockMaxMass is the maximum block mass to be used when generating a
|
|
// block template.
|
|
BlockMaxMass uint64
|
|
}
|