Make PubKey variable names consistent.
This commit is contained in:
parent
88b15e74f0
commit
b448a2b6bc
3 changed files with 11 additions and 11 deletions
|
@ -1596,8 +1596,8 @@ type rescanKeys struct {
|
|||
fallbacks map[string]struct{}
|
||||
pubKeyHashes map[[ripemd160.Size]byte]struct{}
|
||||
scriptHashes map[[ripemd160.Size]byte]struct{}
|
||||
compressedPubkeys map[[33]byte]struct{}
|
||||
uncompressedPubkeys map[[65]byte]struct{}
|
||||
compressedPubKeys map[[33]byte]struct{}
|
||||
uncompressedPubKeys map[[65]byte]struct{}
|
||||
unspent map[wire.OutPoint]struct{}
|
||||
}
|
||||
|
||||
|
@ -1684,14 +1684,14 @@ func rescanBlock(wsc *wsClient, lookups *rescanKeys, blk *btcutil.Block) {
|
|||
case 33: // Compressed
|
||||
var key [33]byte
|
||||
copy(key[:], sa)
|
||||
if _, ok := lookups.compressedPubkeys[key]; ok {
|
||||
if _, ok := lookups.compressedPubKeys[key]; ok {
|
||||
found = true
|
||||
}
|
||||
|
||||
case 65: // Uncompressed
|
||||
var key [65]byte
|
||||
copy(key[:], sa)
|
||||
if _, ok := lookups.uncompressedPubkeys[key]; ok {
|
||||
if _, ok := lookups.uncompressedPubKeys[key]; ok {
|
||||
found = true
|
||||
}
|
||||
|
||||
|
@ -1839,8 +1839,8 @@ func handleRescan(wsc *wsClient, icmd interface{}) (interface{}, error) {
|
|||
fallbacks: map[string]struct{}{},
|
||||
pubKeyHashes: map[[ripemd160.Size]byte]struct{}{},
|
||||
scriptHashes: map[[ripemd160.Size]byte]struct{}{},
|
||||
compressedPubkeys: map[[33]byte]struct{}{},
|
||||
uncompressedPubkeys: map[[65]byte]struct{}{},
|
||||
compressedPubKeys: map[[33]byte]struct{}{},
|
||||
uncompressedPubKeys: map[[65]byte]struct{}{},
|
||||
unspent: map[wire.OutPoint]struct{}{},
|
||||
}
|
||||
var compressedPubkey [33]byte
|
||||
|
@ -1867,11 +1867,11 @@ func handleRescan(wsc *wsClient, icmd interface{}) (interface{}, error) {
|
|||
switch len(pubkeyBytes) {
|
||||
case 33: // Compressed
|
||||
copy(compressedPubkey[:], pubkeyBytes)
|
||||
lookups.compressedPubkeys[compressedPubkey] = struct{}{}
|
||||
lookups.compressedPubKeys[compressedPubkey] = struct{}{}
|
||||
|
||||
case 65: // Uncompressed
|
||||
copy(uncompressedPubkey[:], pubkeyBytes)
|
||||
lookups.uncompressedPubkeys[uncompressedPubkey] = struct{}{}
|
||||
lookups.uncompressedPubKeys[uncompressedPubkey] = struct{}{}
|
||||
|
||||
default:
|
||||
jsonErr := btcjson.RPCError{
|
||||
|
|
|
@ -58,9 +58,9 @@ var (
|
|||
// without and OP_ENDIF to correspond to a conditional expression.
|
||||
ErrStackMissingEndif = fmt.Errorf("execute fail, in conditional execution")
|
||||
|
||||
// ErrStackTooManyPubkeys is returned if an OP_CHECKMULTISIG is
|
||||
// ErrStackTooManyPubKeys is returned if an OP_CHECKMULTISIG is
|
||||
// encountered with more than MaxPubKeysPerMultiSig pubkeys present.
|
||||
ErrStackTooManyPubkeys = errors.New("Invalid pubkey count in OP_CHECKMULTISIG")
|
||||
ErrStackTooManyPubKeys = errors.New("Invalid pubkey count in OP_CHECKMULTISIG")
|
||||
|
||||
// ErrStackTooManyOperations is returned if a script has more than
|
||||
// MaxOpsPerScript opcodes that do not push data.
|
||||
|
|
|
@ -1904,7 +1904,7 @@ func opcodeCheckMultiSig(op *parsedOpcode, vm *Engine) error {
|
|||
|
||||
numPubKeys := int(numKeys.Int32())
|
||||
if numPubKeys < 0 || numPubKeys > MaxPubKeysPerMultiSig {
|
||||
return ErrStackTooManyPubkeys
|
||||
return ErrStackTooManyPubKeys
|
||||
}
|
||||
vm.numOps += numPubKeys
|
||||
if vm.numOps > MaxOpsPerScript {
|
||||
|
|
Loading…
Add table
Reference in a new issue