mirror of
https://github.com/FlipsideCrypto/dcrd.git
synced 2026-02-06 10:56:47 +00:00
multi: fix some maligned linter warnings
This commit is contained in:
parent
516f300863
commit
393a95c079
@ -237,20 +237,20 @@ func ConvertUtxosToMinimalOutputs(entry *UtxoEntry) []*stake.MinimalOutput {
|
||||
//
|
||||
// The struct is aligned for memory efficiency.
|
||||
type spentTxOut struct {
|
||||
pkScript []byte // The public key script for the output.
|
||||
stakeExtra []byte // Extra information for the staking system.
|
||||
pkScript []byte // The public key script for the output.
|
||||
stakeExtra []byte // Extra information for the staking system.
|
||||
|
||||
amount int64 // The amount of the output.
|
||||
txVersion uint16 // The version of creating tx.
|
||||
txType stake.TxType // The stake type of the transaction.
|
||||
height uint32 // Height of the the block containing the tx.
|
||||
index uint32 // Index in the block of the transaction.
|
||||
scriptVersion uint16 // The version of the scripting language.
|
||||
txType stake.TxType // The stake type of the transaction.
|
||||
txVersion uint16 // The version of creating tx.
|
||||
|
||||
txFullySpent bool // Whether or not the transaction is fully spent.
|
||||
isCoinBase bool // Whether creating tx is a coinbase.
|
||||
hasExpiry bool // The expiry of the creating tx.
|
||||
|
||||
compressed bool // Whether or not the script is compressed.
|
||||
compressed bool // Whether or not the script is compressed.
|
||||
}
|
||||
|
||||
// spentTxOutSerializeSize returns the number of bytes it would take to
|
||||
|
||||
@ -136,8 +136,8 @@ const databaseInfoSize = 8
|
||||
|
||||
// DatabaseInfo is the structure for a database.
|
||||
type DatabaseInfo struct {
|
||||
Version uint32
|
||||
Date time.Time
|
||||
Version uint32
|
||||
UpgradeStarted bool
|
||||
}
|
||||
|
||||
|
||||
@ -92,10 +92,10 @@ type UtxoEntry struct {
|
||||
sparseOutputs map[uint32]*utxoOutput // Sparse map of unspent outputs.
|
||||
stakeExtra []byte // Extra data for the staking system.
|
||||
|
||||
txVersion uint16 // The tx version of this tx.
|
||||
txType stake.TxType // The stake type of the transaction.
|
||||
height uint32 // Height of block containing tx.
|
||||
index uint32 // Index of containing tx in block.
|
||||
txType stake.TxType // The stake type of the transaction.
|
||||
txVersion uint16 // The tx version of this tx.
|
||||
|
||||
isCoinBase bool // Whether entry is a coinbase tx.
|
||||
hasExpiry bool // Whether entry has an expiry.
|
||||
|
||||
@ -58,13 +58,13 @@ type ConnReq struct {
|
||||
// The following variables must only be used atomically.
|
||||
id uint64
|
||||
|
||||
Addr net.Addr
|
||||
Permanent bool
|
||||
Addr net.Addr
|
||||
|
||||
conn net.Conn
|
||||
state ConnState
|
||||
stateMtx sync.RWMutex
|
||||
retryCount uint32
|
||||
Permanent bool
|
||||
state ConnState
|
||||
}
|
||||
|
||||
// updateState updates the state of the connection request.
|
||||
|
||||
@ -108,6 +108,11 @@ type writeCursor struct {
|
||||
// blockStore houses information used to handle reading and writing blocks (and
|
||||
// part of blocks) into flat files with support for multiple concurrent readers.
|
||||
type blockStore struct {
|
||||
// maxBlockFileSize is the maximum size for each file used to store
|
||||
// blocks. It is defined on the store so the whitebox tests can
|
||||
// override the value.
|
||||
maxBlockFileSize uint32
|
||||
|
||||
// network is the specific network to use in the flat files for each
|
||||
// block.
|
||||
network wire.CurrencyNet
|
||||
@ -115,11 +120,6 @@ type blockStore struct {
|
||||
// basePath is the base path used for the flat block files and metadata.
|
||||
basePath string
|
||||
|
||||
// maxBlockFileSize is the maximum size for each file used to store
|
||||
// blocks. It is defined on the store so the whitebox tests can
|
||||
// override the value.
|
||||
maxBlockFileSize uint32
|
||||
|
||||
// The following fields are related to the flat files which hold the
|
||||
// actual blocks. The number of open files is limited by maxOpenFiles.
|
||||
//
|
||||
|
||||
@ -102,10 +102,10 @@ type ExtendedKey struct {
|
||||
key []byte // This will be the pubkey for extended pub keys
|
||||
pubKey []byte // This will only be set for extended priv keys
|
||||
chainCode []byte
|
||||
depth uint16
|
||||
parentFP []byte
|
||||
childNum uint32
|
||||
version []byte
|
||||
childNum uint32
|
||||
depth uint16
|
||||
isPrivate bool
|
||||
}
|
||||
|
||||
|
||||
@ -40,8 +40,8 @@ var (
|
||||
type utxo struct {
|
||||
pkScript []byte
|
||||
value dcrutil.Amount
|
||||
keyIndex uint32
|
||||
maturityHeight int64
|
||||
keyIndex uint32
|
||||
isLocked bool
|
||||
}
|
||||
|
||||
|
||||
@ -95,21 +95,22 @@ var halfOrder = new(big.Int).Rsh(chainec.Secp256k1.GetN(), 1)
|
||||
|
||||
// Engine is the virtual machine that executes scripts.
|
||||
type Engine struct {
|
||||
version uint16
|
||||
scripts [][]parsedOpcode
|
||||
scriptIdx int
|
||||
scriptOff int
|
||||
lastCodeSep int
|
||||
dstack stack // data stack
|
||||
astack stack // alt stack
|
||||
tx wire.MsgTx
|
||||
txIdx int
|
||||
condStack []int
|
||||
numOps int
|
||||
flags ScriptFlags
|
||||
sigCache *SigCache
|
||||
bip16 bool // treat execution as pay-to-script-hash
|
||||
savedFirstStack [][]byte // stack from first script for bip16 scripts
|
||||
sigCache *SigCache
|
||||
|
||||
scriptIdx int
|
||||
scriptOff int
|
||||
lastCodeSep int
|
||||
dstack stack // data stack
|
||||
astack stack // alt stack
|
||||
tx wire.MsgTx
|
||||
txIdx int
|
||||
condStack []int
|
||||
numOps int
|
||||
flags ScriptFlags
|
||||
version uint16
|
||||
bip16 bool // treat execution as pay-to-script-hash
|
||||
}
|
||||
|
||||
// hasFlag returns whether the script engine instance has the passed flag set.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user