diff --git a/rpcwebsocket.go b/rpcwebsocket.go index 86f508bb..3c1781fc 100644 --- a/rpcwebsocket.go +++ b/rpcwebsocket.go @@ -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{ diff --git a/txscript/error.go b/txscript/error.go index 346a418e..f9a806dd 100644 --- a/txscript/error.go +++ b/txscript/error.go @@ -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. diff --git a/txscript/opcode.go b/txscript/opcode.go index a5a8d213..2c31098f 100644 --- a/txscript/opcode.go +++ b/txscript/opcode.go @@ -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 {