Skip to content

Commit 95c744d

Browse files
committed
clean up todos
1 parent c049253 commit 95c744d

File tree

5 files changed

+1
-35
lines changed

5 files changed

+1
-35
lines changed

compat/bip32/hd_key_test.go

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -327,31 +327,6 @@ func TestGetHDKeyChild(t *testing.T) {
327327
require.NoError(t, err)
328328
assert.NotNil(t, validKey)
329329

330-
// Max depth key
331-
/*
332-
var maxKey *ExtendedKey
333-
maxKey, err = GetHDKeyByPath(validKey, 1<<9, 1<<9)
334-
if err != nil {
335-
t.Fatalf("error occurred: %s", err.Error())
336-
}
337-
*/
338-
339-
// Test depth limit
340-
// todo: make a better test (after 126 maxKey is now nil)
341-
/*
342-
for i := 0; i < 1<<8-1; i++ {
343-
maxKey, err = GetHDKeyChild(maxKey, uint32(i))
344-
if i < 126 && err != nil {
345-
t.Fatalf("error occurred: %s", err.Error())
346-
}
347-
// TODO: make this better rather than grabbing the child twice. This is
348-
// basically a copy of the GetHDKeyByPath test
349-
maxKey, err = GetHDKeyChild(maxKey, uint32(i))
350-
if i >= 126 && err == nil {
351-
t.Fatalf("expected to hit depth limit on HD key index: %d", i)
352-
}
353-
}
354-
*/
355330

356331
var tests = []struct {
357332
inputHDKey *compat.ExtendedKey

primitives/ec/precompute.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package primitives
22

3-
// TODO: Move to license file
43
// Copyright 2015 The btcsuite developers
54
// Use of this source code is governed by an ISC
65
// license that can be found in the LICENSE file.

script/address.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ import (
1414
const (
1515
hashP2PKH = 0x00
1616
hashTestNetP2PKH = 0x6f
17-
hashP2SH = 0x05 // TODO: remove deprecated p2sh stuff
18-
hashTestNetP2SH = 0xc4
1917
)
2018

2119
// An Address struct contains the address string as well as the hash160 hex string of the public key.
@@ -56,10 +54,6 @@ func addressToPubKeyHash(address string) ([]byte, error) {
5654
case hashTestNetP2PKH: // Testnet pubkey hash (P2PKH address)
5755
return decoded[1 : len(decoded)-4], nil
5856

59-
case hashP2SH: // Script hash (P2SH address)
60-
fallthrough
61-
case hashTestNetP2SH: // Testnet script hash (P2SH address)
62-
fallthrough
6357
default:
6458
return []byte{}, fmt.Errorf("%w %s", ErrUnsupportedAddress, address)
6559
}

script/script.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414

1515
// ScriptKey types.
1616
const (
17-
// TODO: change to p2pk/p2pkh
1817
ScriptTypePubKey = "pubkey"
1918
ScriptTypePubKeyHash = "pubkeyhash"
2019
ScriptTypeNonStandard = "nonstandard"
@@ -199,7 +198,6 @@ func (s *Script) IsP2PK() bool {
199198
}
200199

201200
// IsP2SH returns true if this is a p2sh output script.
202-
// TODO: remove all p2sh stuff from repo
203201
func (s *Script) IsP2SH() bool {
204202
b := []byte(*s)
205203

script/script_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func TestScript_IsData(t *testing.T) {
118118
require.True(t, scriptPub.IsData())
119119
}
120120

121-
func TestScript_IsMultisigOut(t *testing.T) { // TODO: check this
121+
func TestScript_IsMultisigOut(t *testing.T) {
122122
t.Parallel()
123123

124124
t.Run("is multisig", func(t *testing.T) {

0 commit comments

Comments
 (0)