Browse Source

because long error prone change

master
Loki Verloren 6 months ago
parent
commit
df6ed2647d
100 changed files with 437 additions and 429 deletions
  1. 3
    3
      addrmgr/addrmanager_internal_test.go
  2. 2
    2
      addrmgr/addrmanager_test.go
  3. 16
    16
      addrmgr/amc/consts.go
  4. 0
    25
      addrmgr/internal_test.go
  5. 25
    0
      addrmgr/known/internal_test.go
  6. 2
    2
      addrmgr/knownaddress_test.go
  7. 2
    2
      addrmgr/network_test.go
  8. 3
    3
      blockchain/chain_test.go
  9. 2
    2
      blockchain/chainio_test.go
  10. 1
    1
      blockchain/chainview_test.go
  11. 6
    6
      blockchain/common_test.go
  12. 7
    7
      blockchain/compress.go
  13. 4
    4
      blockchain/example_test.go
  14. 8
    8
      blockchain/fullblocks_test.go
  15. 1
    1
      blockchain/fullblocktests/generate.go
  16. 1
    1
      blockchain/indexers/addrindex_test.go
  17. 1
    1
      blockchain/merkle.go
  18. 1
    1
      blockchain/notifications_test.go
  19. 1
    1
      blockchain/scriptval_test.go
  20. 1
    1
      blockchain/thresholdstate_test.go
  21. 1
    1
      blockchain/validate.go
  22. 8
    8
      blockchain/validate_test.go
  23. 5
    3
      btcd/btcd.go
  24. 1
    1
      btcd/cnf/config.go
  25. 2
    0
      btcd/config.go
  26. 4
    0
      btcd/defaults/defaults.go
  27. 1
    1
      btcd/doc.go
  28. 4
    4
      btcd/nettype/params.go
  29. 17
    17
      btcd/rpcserver.go
  30. 2
    2
      btcec/example_test.go
  31. 1
    1
      btcjson/btcdextcmds_test.go
  32. 1
    1
      btcjson/btcdextresults_test.go
  33. 1
    1
      btcjson/btcwalletextcmds_test.go
  34. 2
    2
      btcjson/chainsvrcmds_test.go
  35. 1
    1
      btcjson/chainsvrresults_test.go
  36. 1
    1
      btcjson/chainsvrwscmds_test.go
  37. 1
    1
      btcjson/chainsvrwsntfns_test.go
  38. 1
    1
      btcjson/chainsvrwsresults_test.go
  39. 1
    1
      btcjson/cmdinfo_test.go
  40. 1
    1
      btcjson/cmdparse_test.go
  41. 1
    1
      btcjson/error_test.go
  42. 1
    1
      btcjson/example_test.go
  43. 1
    1
      btcjson/help_test.go
  44. 1
    1
      btcjson/helpers_test.go
  45. 1
    1
      btcjson/jsonrpc_test.go
  46. 1
    1
      btcjson/register_test.go
  47. 1
    1
      btcjson/walletsvrcmds_test.go
  48. 1
    1
      btcjson/walletsvrwscmds_test.go
  49. 1
    1
      btcjson/walletsvrwsntfns_test.go
  50. 1
    1
      btcutil/address_test.go
  51. 7
    7
      btcutil/block_test.go
  52. 2
    2
      btcutil/bloom/example_test.go
  53. 2
    2
      btcutil/bloom/filter_test.go
  54. 2
    2
      btcutil/bloom/merkleblock_test.go
  55. 2
    2
      btcutil/coinset/coins_test.go
  56. 4
    4
      btcutil/gcs/builder/builder_test.go
  57. 1
    1
      btcutil/hdkeychain/example_test.go
  58. 1
    1
      btcutil/hdkeychain/extendedkey_test.go
  59. 1
    1
      btcutil/internal_test.go
  60. 1
    1
      btcutil/tx_test.go
  61. 1
    1
      btcutil/txsort/txsort_test.go
  62. 2
    2
      btcutil/wif_test.go
  63. 1
    1
      chaincfg/register_test.go
  64. 2
    2
      database/driver_test.go
  65. 1
    1
      database/error_test.go
  66. 10
    10
      database/example_test.go
  67. 2
    2
      database/ffldb/bench_test.go
  68. 3
    3
      database/ffldb/driver_test.go
  69. 1
    1
      database/ffldb/export_test.go
  70. 4
    4
      database/ffldb/interface_test.go
  71. 3
    3
      database/ffldb/whitebox_test.go
  72. 4
    4
      docs/README.md
  73. 4
    4
      integration/bip0009_test.go
  74. 7
    7
      integration/csv_fork_test.go
  75. 2
    2
      integration/rpcserver_test.go
  76. 1
    1
      integration/rpctest/memwallet.go
  77. 4
    4
      integration/rpctest/rpc_harness_test.go
  78. 1
    1
      main.go
  79. 3
    3
      mempool/estimatefee_test.go
  80. 6
    6
      mempool/mempool_test.go
  81. 7
    7
      mempool/policy.go
  82. 7
    7
      mempool/policy_test.go
  83. 1
    1
      mining/mining.go
  84. 1
    1
      mining/policy.go
  85. 3
    3
      mining/policy_test.go
  86. 3
    3
      peer/example_test.go
  87. 2
    2
      peer/mruinvmap_test.go
  88. 4
    4
      peer/peer_test.go
  89. 1
    1
      rpcclient/doc.go
  90. 4
    4
      txscript/data/script_tests.json
  91. 1
    1
      txscript/engine.go
  92. 2
    2
      txscript/engine_test.go
  93. 6
    6
      txscript/example_test.go
  94. 1
    1
      txscript/hashcache_test.go
  95. 112
    112
      txscript/opcode.go
  96. 3
    3
      txscript/opcode_test.go
  97. 22
    22
      txscript/pkscript_test.go
  98. 8
    8
      txscript/reference_test.go
  99. 11
    11
      txscript/script.go
  100. 0
    0
      txscript/script_test.go

+ 3
- 3
addrmgr/addrmanager_internal_test.go View File

@@ -114,7 +114,7 @@ func TestAddrManagerSerialization(t *testing.T) {
114 114
 
115 115
 	// Finally, we'll read all of the addresses from disk and ensure they
116 116
 	// match as expected.
117
-	addrMgr.loadPeers()
117
+	addrMgr.loadPeers(nil)
118 118
 	assertAddrs(t, addrMgr, expectedAddrs)
119 119
 }
120 120
 
@@ -159,7 +159,7 @@ func TestAddrManagerV1ToV2(t *testing.T) {
159 159
 	// SFNodeNetwork since they were not previously stored. After ensuring
160 160
 	// that this default is set, we'll override each addresses' services
161 161
 	// with the original value from when they were created.
162
-	addrMgr.loadPeers()
162
+	addrMgr.loadPeers(nil)
163 163
 	addrs := addrMgr.getAddresses()
164 164
 	if len(addrs) != len(expectedAddrs) {
165 165
 		t.Fatalf("expected to find %d adddresses, found %d",
@@ -189,6 +189,6 @@ func TestAddrManagerV1ToV2(t *testing.T) {
189 189
 	// Finally, we'll recreate the manager and ensure that the services were
190 190
 	// persisted correctly.
191 191
 	addrMgr = New(tempDir, nil)
192
-	addrMgr.loadPeers()
192
+	addrMgr.loadPeers(nil)
193 193
 	assertAddrs(t, addrMgr, expectedAddrs)
194 194
 }

+ 2
- 2
addrmgr/addrmanager_test.go View File

@@ -12,8 +12,8 @@ import (
12 12
 	"testing"
13 13
 	"time"
14 14
 
15
-	"github.com/btcsuite/btcd/addrmgr"
16
-	"github.com/btcsuite/btcd/wire"
15
+	"git.parallelcoin.io/dev/btcd/addrmgr"
16
+	"git.parallelcoin.io/dev/btcd/wire"
17 17
 )
18 18
 
19 19
 // naTest is used to describe a test to be performed against the NetAddressKey

+ 16
- 16
addrmgr/amc/consts.go View File

@@ -5,67 +5,67 @@ import (
5 5
 )
6 6
 
7 7
 const (
8
-	// needAddressThreshold is the number of addresses under which the
8
+	// NeedAddressThreshold is the number of addresses under which the
9 9
 	// address manager will claim to need more addresses.
10 10
 	NeedAddressThreshold = 1000
11 11
 
12
-	// dumpAddressInterval is the interval used to dump the address
12
+	// DumpAddressInterval is the interval used to dump the address
13 13
 	// cache to disk for future use.
14 14
 	DumpAddressInterval = time.Minute * 10
15 15
 
16
-	// triedBucketSize is the maximum number of addresses in each
16
+	// TriedBucketSize is the maximum number of addresses in each
17 17
 	// tried address bucket.
18 18
 	TriedBucketSize = 256
19 19
 
20
-	// triedBucketCount is the number of buckets we split tried
20
+	// TriedBucketCount is the number of buckets we split tried
21 21
 	// addresses over.
22 22
 	TriedBucketCount = 64
23 23
 
24
-	// newBucketSize is the maximum number of addresses in each new address
24
+	// NewBucketSize is the maximum number of addresses in each new address
25 25
 	// bucket.
26 26
 	NewBucketSize = 64
27 27
 
28
-	// newBucketCount is the number of buckets that we spread new addresses
28
+	// NewBucketCount is the number of buckets that we spread new addresses
29 29
 	// over.
30 30
 	NewBucketCount = 1024
31 31
 
32
-	// triedBucketsPerGroup is the number of tried buckets over which an
32
+	// TriedBucketsPerGroup is the number of tried buckets over which an
33 33
 	// address group will be spread.
34 34
 	TriedBucketsPerGroup = 8
35 35
 
36
-	// newBucketsPerGroup is the number of new buckets over which an
36
+	// NewBucketsPerGroup is the number of new buckets over which an
37 37
 	// source address group will be spread.
38 38
 	NewBucketsPerGroup = 64
39 39
 
40
-	// newBucketsPerAddress is the number of buckets a frequently seen new
40
+	// NewBucketsPerAddress is the number of buckets a frequently seen new
41 41
 	// address may end up in.
42 42
 	NewBucketsPerAddress = 8
43 43
 
44
-	// numMissingDays is the number of days before which we assume an
44
+	// NumMissingDays is the number of days before which we assume an
45 45
 	// address has vanished if we have not seen it announced  in that long.
46 46
 	NumMissingDays = 30
47 47
 
48
-	// numRetries is the number of tried without a single success before
48
+	// NumRetries is the number of tried without a single success before
49 49
 	// we assume an address is bad.
50 50
 	NumRetries = 3
51 51
 
52
-	// maxFailures is the maximum number of failures we will accept without
52
+	// MaxFailures is the maximum number of failures we will accept without
53 53
 	// a success before considering an address bad.
54 54
 	MaxFailures = 10
55 55
 
56
-	// minBadDays is the number of days since the last success before we
56
+	// MinBadDays is the number of days since the last success before we
57 57
 	// will consider evicting an address.
58 58
 	MinBadDays = 7
59 59
 
60
-	// getAddrMax is the most addresses that we will send in response
60
+	// GetAddrMax is the most addresses that we will send in response
61 61
 	// to a getAddr (in practise the most addresses we will return from a
62 62
 	// call to AddressCache()).
63 63
 	GetAddrMax = 2500
64 64
 
65
-	// getAddrPercent is the percentage of total addresses known that we
65
+	// GetAddrPercent is the percentage of total addresses known that we
66 66
 	// will share with a call to AddressCache.
67 67
 	GetAddrPercent = 23
68 68
 
69
-	// serialisationVersion is the current version of the on-disk format.
69
+	// SerialisationVersion is the current version of the on-disk format.
70 70
 	SerialisationVersion = 2
71 71
 )

+ 0
- 25
addrmgr/internal_test.go View File

@@ -1,25 +0,0 @@
1
-// Copyright (c) 2013-2015 The btcsuite developers
2
-// Use of this source code is governed by an ISC
3
-// license that can be found in the LICENSE file.
4
-
5
-package addrmgr
6
-
7
-import (
8
-	"time"
9
-
10
-	"github.com/btcsuite/btcd/wire"
11
-)
12
-
13
-func TstKnownAddressIsBad(ka *KnownAddress) bool {
14
-	return ka.isBad()
15
-}
16
-
17
-func TstKnownAddressChance(ka *KnownAddress) float64 {
18
-	return ka.chance()
19
-}
20
-
21
-func TstNewKnownAddress(na *wire.NetAddress, attempts int,
22
-	lastattempt, lastsuccess time.Time, tried bool, refs int) *KnownAddress {
23
-	return &KnownAddress{na: na, attempts: attempts, lastattempt: lastattempt,
24
-		lastsuccess: lastsuccess, tried: tried, refs: refs}
25
-}

+ 25
- 0
addrmgr/known/internal_test.go View File

@@ -0,0 +1,25 @@
1
+// Copyright (c) 2013-2015 The btcsuite developers
2
+// Use of this source code is governed by an ISC
3
+// license that can be found in the LICENSE file.
4
+
5
+package known
6
+
7
+import (
8
+	"time"
9
+
10
+	"git.parallelcoin.io/dev/btcd/wire"
11
+)
12
+
13
+func TstAddressIsBad(ka *Address) bool {
14
+	return ka.IsBad()
15
+}
16
+
17
+func TstAddressChance(ka *Address) float64 {
18
+	return ka.Chance()
19
+}
20
+
21
+func TstNewAddress(na *wire.NetAddress, attempts int,
22
+	lastattempt, lastsuccess time.Time, tried bool, refs int) *Address {
23
+	return &Address{NA: na, Attempts: attempts, Lastattempt: lastattempt,
24
+		Lastsuccess: lastsuccess, Tried: tried, Refs: refs}
25
+}

+ 2
- 2
addrmgr/knownaddress_test.go View File

@@ -9,8 +9,8 @@ import (
9 9
 	"testing"
10 10
 	"time"
11 11
 
12
-	"github.com/btcsuite/btcd/addrmgr"
13
-	"github.com/btcsuite/btcd/wire"
12
+	"git.parallelcoin.io/dev/btcd/addrmgr"
13
+	"git.parallelcoin.io/dev/btcd/wire"
14 14
 )
15 15
 
16 16
 func TestChance(t *testing.T) {

+ 2
- 2
addrmgr/network_test.go View File

@@ -8,8 +8,8 @@ import (
8 8
 	"net"
9 9
 	"testing"
10 10
 
11
-	"github.com/btcsuite/btcd/addrmgr"
12
-	"github.com/btcsuite/btcd/wire"
11
+	"git.parallelcoin.io/dev/btcd/addrmgr"
12
+	"git.parallelcoin.io/dev/btcd/wire"
13 13
 )
14 14
 
15 15
 // TestIPTypes ensures the various functions which determine the type of an IP

+ 3
- 3
blockchain/chain_test.go View File

@@ -9,9 +9,9 @@ import (
9 9
 	"testing"
10 10
 	"time"
11 11
 
12
-	"github.com/btcsuite/btcd/chaincfg"
13
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
14
-	"github.com/btcsuite/btcd/wire"
12
+	"git.parallelcoin.io/dev/btcd/chaincfg"
13
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
14
+	"git.parallelcoin.io/dev/btcd/wire"
15 15
 	"github.com/btcsuite/btcutil"
16 16
 )
17 17
 

+ 2
- 2
blockchain/chainio_test.go View File

@@ -11,8 +11,8 @@ import (
11 11
 	"reflect"
12 12
 	"testing"
13 13
 
14
-	"github.com/btcsuite/btcd/database"
15
-	"github.com/btcsuite/btcd/wire"
14
+	"git.parallelcoin.io/dev/btcd/database"
15
+	"git.parallelcoin.io/dev/btcd/wire"
16 16
 )
17 17
 
18 18
 // TestErrNotInMainChain ensures the functions related to errNotInMainChain work

+ 1
- 1
blockchain/chainview_test.go View File

@@ -10,7 +10,7 @@ import (
10 10
 	"reflect"
11 11
 	"testing"
12 12
 
13
-	"github.com/btcsuite/btcd/wire"
13
+	"git.parallelcoin.io/dev/btcd/wire"
14 14
 )
15 15
 
16 16
 // testNoncePrng provides a deterministic prng for the nonce in generated fake

+ 6
- 6
blockchain/common_test.go View File

@@ -14,12 +14,12 @@ import (
14 14
 	"strings"
15 15
 	"time"
16 16
 
17
-	"github.com/btcsuite/btcd/chaincfg"
18
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
19
-	"github.com/btcsuite/btcd/database"
20
-	_ "github.com/btcsuite/btcd/database/ffldb"
21
-	"github.com/btcsuite/btcd/txscript"
22
-	"github.com/btcsuite/btcd/wire"
17
+	"git.parallelcoin.io/dev/btcd/chaincfg"
18
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
19
+	"git.parallelcoin.io/dev/btcd/database"
20
+	_ "git.parallelcoin.io/dev/btcd/database/ffldb"
21
+	"git.parallelcoin.io/dev/btcd/txscript"
22
+	"git.parallelcoin.io/dev/btcd/wire"
23 23
 	"github.com/btcsuite/btcutil"
24 24
 )
25 25
 

+ 7
- 7
blockchain/compress.go View File

@@ -177,7 +177,7 @@ const (
177 177
 func isPubKeyHash(script []byte) (bool, []byte) {
178 178
 	if len(script) == 25 && script[0] == txscript.OP_DUP &&
179 179
 		script[1] == txscript.OP_HASH160 &&
180
-		script[2] == txscript.OP_DATA_20 &&
180
+		script[2] == txscript.OpData20 &&
181 181
 		script[23] == txscript.OP_EQUALVERIFY &&
182 182
 		script[24] == txscript.OP_CHECKSIG {
183 183
 
@@ -192,7 +192,7 @@ func isPubKeyHash(script []byte) (bool, []byte) {
192 192
 // if it is.
193 193
 func isScriptHash(script []byte) (bool, []byte) {
194 194
 	if len(script) == 23 && script[0] == txscript.OP_HASH160 &&
195
-		script[1] == txscript.OP_DATA_20 &&
195
+		script[1] == txscript.OpData20 &&
196 196
 		script[22] == txscript.OP_EQUAL {
197 197
 
198 198
 		return true, script[2:22]
@@ -212,7 +212,7 @@ func isScriptHash(script []byte) (bool, []byte) {
212 212
 // to a valid compressed or uncompressed pubkey.
213 213
 func isPubKey(script []byte) (bool, []byte) {
214 214
 	// Pay-to-compressed-pubkey script.
215
-	if len(script) == 35 && script[0] == txscript.OP_DATA_33 &&
215
+	if len(script) == 35 && script[0] == txscript.OpData33 &&
216 216
 		script[34] == txscript.OP_CHECKSIG && (script[1] == 0x02 ||
217 217
 		script[1] == 0x03) {
218 218
 
@@ -363,7 +363,7 @@ func decompressScript(compressedPkScript []byte) []byte {
363 363
 		pkScript := make([]byte, 25)
364 364
 		pkScript[0] = txscript.OP_DUP
365 365
 		pkScript[1] = txscript.OP_HASH160
366
-		pkScript[2] = txscript.OP_DATA_20
366
+		pkScript[2] = txscript.OpData20
367 367
 		copy(pkScript[3:], compressedPkScript[bytesRead:bytesRead+20])
368 368
 		pkScript[23] = txscript.OP_EQUALVERIFY
369 369
 		pkScript[24] = txscript.OP_CHECKSIG
@@ -374,16 +374,16 @@ func decompressScript(compressedPkScript []byte) []byte {
374 374
 	case cstPayToScriptHash:
375 375
 		pkScript := make([]byte, 23)
376 376
 		pkScript[0] = txscript.OP_HASH160
377
-		pkScript[1] = txscript.OP_DATA_20
377
+		pkScript[1] = txscript.OpData20
378 378
 		copy(pkScript[2:], compressedPkScript[bytesRead:bytesRead+20])
379 379
 		pkScript[22] = txscript.OP_EQUAL
380 380
 		return pkScript
381 381
 
382 382
 	// Pay-to-compressed-pubkey script.  The resulting script is:
383
-	// <OP_DATA_33><33 byte compressed pubkey><OP_CHECKSIG>
383
+	// <OpData33><33 byte compressed pubkey><OP_CHECKSIG>
384 384
 	case cstPayToPubKeyComp2, cstPayToPubKeyComp3:
385 385
 		pkScript := make([]byte, 35)
386
-		pkScript[0] = txscript.OP_DATA_33
386
+		pkScript[0] = txscript.OpData33
387 387
 		pkScript[1] = byte(encodedScriptSize)
388 388
 		copy(pkScript[2:], compressedPkScript[bytesRead:bytesRead+32])
389 389
 		pkScript[34] = txscript.OP_CHECKSIG

+ 4
- 4
blockchain/example_test.go View File

@@ -10,10 +10,10 @@ import (
10 10
 	"os"
11 11
 	"path/filepath"
12 12
 
13
-	"github.com/btcsuite/btcd/blockchain"
14
-	"github.com/btcsuite/btcd/chaincfg"
15
-	"github.com/btcsuite/btcd/database"
16
-	_ "github.com/btcsuite/btcd/database/ffldb"
13
+	"git.parallelcoin.io/dev/btcd/blockchain"
14
+	"git.parallelcoin.io/dev/btcd/chaincfg"
15
+	"git.parallelcoin.io/dev/btcd/database"
16
+	_ "git.parallelcoin.io/dev/btcd/database/ffldb"
17 17
 	"github.com/btcsuite/btcutil"
18 18
 )
19 19
 

+ 8
- 8
blockchain/fullblocks_test.go View File

@@ -12,14 +12,14 @@ import (
12 12
 	"path/filepath"
13 13
 	"testing"
14 14
 
15
-	"github.com/btcsuite/btcd/blockchain"
16
-	"github.com/btcsuite/btcd/blockchain/fullblocktests"
17
-	"github.com/btcsuite/btcd/chaincfg"
18
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
19
-	"github.com/btcsuite/btcd/database"
20
-	_ "github.com/btcsuite/btcd/database/ffldb"
21
-	"github.com/btcsuite/btcd/txscript"
22
-	"github.com/btcsuite/btcd/wire"
15
+	"git.parallelcoin.io/dev/btcd/blockchain"
16
+	"git.parallelcoin.io/dev/btcd/blockchain/fullblocktests"
17
+	"git.parallelcoin.io/dev/btcd/chaincfg"
18
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
19
+	"git.parallelcoin.io/dev/btcd/database"
20
+	_ "git.parallelcoin.io/dev/btcd/database/ffldb"
21
+	"git.parallelcoin.io/dev/btcd/txscript"
22
+	"git.parallelcoin.io/dev/btcd/wire"
23 23
 	"github.com/btcsuite/btcutil"
24 24
 )
25 25
 

+ 1
- 1
blockchain/fullblocktests/generate.go View File

@@ -1951,7 +1951,7 @@ func Generate(includeLargeReorg bool) (tests [][]TestInstance, err error) {
1951 1951
 	g.nextBlock("b74", outs[23], replaceSpendScript(script), func(b *wire.MsgBlock) {
1952 1952
 		tx2 := b.Transactions[1]
1953 1953
 		tx3 := createSpendTxForTx(tx2, lowFee)
1954
-		tx3.TxIn[0].SignatureScript = []byte{txscript.OP_FALSE}
1954
+		tx3.TxIn[0].SignatureScript = []byte{txscript.OpFalse}
1955 1955
 		b.AddTransaction(tx3)
1956 1956
 	})
1957 1957
 	accepted()

+ 1
- 1
blockchain/indexers/addrindex_test.go View File

@@ -9,7 +9,7 @@ import (
9 9
 	"fmt"
10 10
 	"testing"
11 11
 
12
-	"github.com/btcsuite/btcd/wire"
12
+	"git.parallelcoin.io/dev/btcd/wire"
13 13
 )
14 14
 
15 15
 // addrIndexBucket provides a mock address index database bucket by implementing

+ 1
- 1
blockchain/merkle.go View File

@@ -30,7 +30,7 @@ var (
30 30
 	// commitment for a block.
31 31
 	WitnessMagicBytes = []byte{
32 32
 		txscript.OP_RETURN,
33
-		txscript.OP_DATA_36,
33
+		txscript.OpData36,
34 34
 		0xaa,
35 35
 		0x21,
36 36
 		0xa9,

+ 1
- 1
blockchain/notifications_test.go View File

@@ -7,7 +7,7 @@ package blockchain
7 7
 import (
8 8
 	"testing"
9 9
 
10
-	"github.com/btcsuite/btcd/chaincfg"
10
+	"git.parallelcoin.io/dev/btcd/chaincfg"
11 11
 )
12 12
 
13 13
 // TestNotifications ensures that notification callbacks are fired on events.

+ 1
- 1
blockchain/scriptval_test.go View File

@@ -9,7 +9,7 @@ import (
9 9
 	"runtime"
10 10
 	"testing"
11 11
 
12
-	"github.com/btcsuite/btcd/txscript"
12
+	"git.parallelcoin.io/dev/btcd/txscript"
13 13
 )
14 14
 
15 15
 // TestCheckBlockScripts ensures that validating the all of the scripts in a

+ 1
- 1
blockchain/thresholdstate_test.go View File

@@ -7,7 +7,7 @@ package blockchain
7 7
 import (
8 8
 	"testing"
9 9
 
10
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
10
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
11 11
 )
12 12
 
13 13
 // TestThresholdStateStringer tests the stringized output for the

+ 1
- 1
blockchain/validate.go View File

@@ -588,7 +588,7 @@ func ExtractCoinbaseHeight(coinbaseTx *btcutil.Tx) (int32, error) {
588 588
 	// Detect the case when the block height is a small integer encoded with
589 589
 	// as single byte.
590 590
 	opcode := int(sigScript[0])
591
-	if opcode == txscript.OP_0 {
591
+	if opcode == txscript.OpZero {
592 592
 		return 0, nil
593 593
 	}
594 594
 	if opcode >= txscript.OP_1 && opcode <= txscript.OP_16 {

+ 8
- 8
blockchain/validate_test.go View File

@@ -10,9 +10,9 @@ import (
10 10
 	"testing"
11 11
 	"time"
12 12
 
13
-	"github.com/btcsuite/btcd/chaincfg"
14
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
15
-	"github.com/btcsuite/btcd/wire"
13
+	"git.parallelcoin.io/dev/btcd/chaincfg"
14
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
15
+	"git.parallelcoin.io/dev/btcd/wire"
16 16
 	"github.com/btcsuite/btcutil"
17 17
 )
18 18
 
@@ -335,7 +335,7 @@ var Block100000 = wire.MsgBlock{
335 335
 					PkScript: []byte{
336 336
 						0x76, // OP_DUP
337 337
 						0xa9, // OP_HASH160
338
-						0x14, // OP_DATA_20
338
+						0x14, // OpData20
339 339
 						0xc3, 0x98, 0xef, 0xa9, 0xc3, 0x92, 0xba, 0x60,
340 340
 						0x13, 0xc5, 0xe0, 0x4e, 0xe7, 0x29, 0x75, 0x5e,
341 341
 						0xf7, 0xf5, 0x8b, 0x32,
@@ -348,7 +348,7 @@ var Block100000 = wire.MsgBlock{
348 348
 					PkScript: []byte{
349 349
 						0x76, // OP_DUP
350 350
 						0xa9, // OP_HASH160
351
-						0x14, // OP_DATA_20
351
+						0x14, // OpData20
352 352
 						0x94, 0x8c, 0x76, 0x5a, 0x69, 0x14, 0xd4, 0x3f,
353 353
 						0x2a, 0x7a, 0xc1, 0x77, 0xda, 0x2c, 0x2f, 0x6b,
354 354
 						0x52, 0xde, 0x3d, 0x7c,
@@ -403,7 +403,7 @@ var Block100000 = wire.MsgBlock{
403 403
 					PkScript: []byte{
404 404
 						0x76, // OP_DUP
405 405
 						0xa9, // OP_HASH160
406
-						0x14, // OP_DATA_20
406
+						0x14, // OpData20
407 407
 						0xb0, 0xdc, 0xbf, 0x97, 0xea, 0xbf, 0x44, 0x04,
408 408
 						0xe3, 0x1d, 0x95, 0x24, 0x77, 0xce, 0x82, 0x2d,
409 409
 						0xad, 0xbe, 0x7e, 0x10,
@@ -416,7 +416,7 @@ var Block100000 = wire.MsgBlock{
416 416
 					PkScript: []byte{
417 417
 						0x76, // OP_DUP
418 418
 						0xa9, // OP_HASH160
419
-						0x14, // OP_DATA_20
419
+						0x14, // OpData20
420 420
 						0x6b, 0x12, 0x81, 0xee, 0xc2, 0x5a, 0xb4, 0xe1,
421 421
 						0xe0, 0x79, 0x3f, 0xf4, 0xe0, 0x8a, 0xb1, 0xab,
422 422
 						0xb3, 0x40, 0x9c, 0xd9,
@@ -472,7 +472,7 @@ var Block100000 = wire.MsgBlock{
472 472
 					PkScript: []byte{
473 473
 						0x76, // OP_DUP
474 474
 						0xa9, // OP_HASH160
475
-						0x14, // OP_DATA_20
475
+						0x14, // OpData20
476 476
 						0x39, 0xaa, 0x3d, 0x56, 0x9e, 0x06, 0xa1, 0xd7,
477 477
 						0x92, 0x6d, 0xc4, 0xbe, 0x11, 0x93, 0xc9, 0x9b,
478 478
 						0xf2, 0xeb, 0x9e, 0xe0,

+ 5
- 3
btcd/btcd.go View File

@@ -3,6 +3,8 @@ package btcd
3 3
 import (
4 4
 	"net"
5 5
 	"net/http"
6
+
7
+	// this initializes pprof
6 8
 	_ "net/http/pprof"
7 9
 	"os"
8 10
 	"path/filepath"
@@ -20,16 +22,16 @@ const (
20 22
 	blockDbNamePrefix = "blocks"
21 23
 )
22 24
 
23
-// winServiceMain is only invoked on Windows.  It detects when btcd is running
25
+// WinServiceMain is only invoked on Windows.  It detects when btcd is running
24 26
 // as a service and reacts accordingly.
25 27
 var WinServiceMain func() (bool, error)
26 28
 
27
-// BtcdMain is the real main function for btcd.  It is necessary to work around
29
+// Main is the real main function for btcd.  It is necessary to work around
28 30
 // the fact that deferred functions do not run when os.Exit() is called.  The
29 31
 // optional serverChan parameter is mainly used by the service code to be
30 32
 // notified with the server once it is setup so it can gracefully stop it when
31 33
 // requested from the service control manager.
32
-func BtcdMain(serverChan chan<- *server) error {
34
+func Main(serverChan chan<- *server) error {
33 35
 	// Load configuration and parse command line.  This function also
34 36
 	// initializes logging and configures it accordingly.
35 37
 	cfg, _, err := loadConfig()

+ 1
- 1
btcd/cnf/config.go View File

@@ -9,7 +9,7 @@ import (
9 9
 	"git.parallelcoin.io/dev/btcd/chaincfg"
10 10
 )
11 11
 
12
-// config defines the configuration options for btcd.
12
+// Config defines the configuration options for btcd.
13 13
 //
14 14
 // See loadConfig for details on the configuration load process.
15 15
 type Config struct {

+ 2
- 0
btcd/config.go View File

@@ -25,6 +25,8 @@ import (
25 25
 	"git.parallelcoin.io/dev/btcd/chaincfg"
26 26
 	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
27 27
 	"git.parallelcoin.io/dev/btcd/connmgr"
28
+
29
+	// This is to trigger the init to load available db backends
28 30
 	_ "git.parallelcoin.io/dev/btcd/database/ffldb"
29 31
 	"git.parallelcoin.io/dev/btcd/mempool"
30 32
 	"github.com/btcsuite/go-socks/socks"

+ 4
- 0
btcd/defaults/defaults.go View File

@@ -7,10 +7,13 @@ import (
7 7
 	"git.parallelcoin.io/dev/btcd/blockchain"
8 8
 	"git.parallelcoin.io/dev/btcd/btcutil"
9 9
 	"git.parallelcoin.io/dev/btcd/database"
10
+
11
+	// This is to trigger the init to load available db backends
10 12
 	_ "git.parallelcoin.io/dev/btcd/database/ffldb"
11 13
 	"git.parallelcoin.io/dev/btcd/peer"
12 14
 )
13 15
 
16
+// These are all the defaults for the things
14 17
 const (
15 18
 	ConfigFilename        = "btcd.conf"
16 19
 	DataDirname           = "data"
@@ -44,6 +47,7 @@ const (
44 47
 	AddrIndex             = false
45 48
 )
46 49
 
50
+// These would be constants but they can't be
47 51
 var (
48 52
 	HomeDir      = btcutil.AppDataDir("btcd", false)
49 53
 	ConfigFile   = filepath.Join(HomeDir, ConfigFilename)

+ 1
- 1
btcd/doc.go View File

@@ -1,4 +1,4 @@
1
-/*package btcd is a full-node bitcoin implementation written in Go.
1
+/*Package btcd is a full-node bitcoin implementation written in Go.
2 2
 
3 3
 The default options are sane for most users.  This means btcd will work 'out of
4 4
 the box' for most users.  However, there are also a wide variety of flags that

+ 4
- 4
btcd/nettype/params.go View File

@@ -16,7 +16,7 @@ type Params struct {
16 16
 	RPCPort string
17 17
 }
18 18
 
19
-// MainNetParams contains parameters specific to the main network
19
+// MainNet contains parameters specific to the main network
20 20
 // (wire.MainNet).  NOTE: The RPC port is intentionally different than the
21 21
 // reference implementation because btcd does not handle wallet requests.  The
22 22
 // separate wallet process listens on the well-known port and forwards requests
@@ -27,7 +27,7 @@ var MainNet = Params{
27 27
 	RPCPort: "8334",
28 28
 }
29 29
 
30
-// RegressionNetParams contains parameters specific to the regression test
30
+// RegressionNet contains parameters specific to the regression test
31 31
 // network (wire.TestNet).  NOTE: The RPC port is intentionally different
32 32
 // than the reference implementation - see the MainNetParams comment for
33 33
 // details.
@@ -36,7 +36,7 @@ var RegressionNet = Params{
36 36
 	RPCPort: "18334",
37 37
 }
38 38
 
39
-// TestNet3Params contains parameters specific to the test network (version 3)
39
+// TestNet3 contains parameters specific to the test network (version 3)
40 40
 // (wire.TestNet3).  NOTE: The RPC port is intentionally different than the
41 41
 // reference implementation - see the MainNetParams comment for details.
42 42
 var TestNet3 = Params{
@@ -44,7 +44,7 @@ var TestNet3 = Params{
44 44
 	RPCPort: "18334",
45 45
 }
46 46
 
47
-// SimNetParams contains parameters specific to the simulation test network
47
+// SimNet contains parameters specific to the simulation test network
48 48
 // (wire.SimNet).
49 49
 var SimNet = Params{
50 50
 	Params:  &chaincfg.SimNetParams,

+ 17
- 17
btcd/rpcserver.go View File

@@ -320,9 +320,9 @@ func rpcNoTxInfoError(txHash *chainhash.Hash) *btcjson.RPCError {
320 320
 			txHash))
321 321
 }
322 322
 
323
-// gbtWorkState houses state that is used in between multiple RPC invocations to
323
+// GBTWorkState houses state that is used in between multiple RPC invocations to
324 324
 // getblocktemplate.
325
-type gbtWorkState struct {
325
+type GBTWorkState struct {
326 326
 	sync.Mutex
327 327
 	lastTxUpdate  time.Time
328 328
 	lastGenerated time.Time
@@ -333,10 +333,10 @@ type gbtWorkState struct {
333 333
 	timeSource    blockchain.MedianTimeSource
334 334
 }
335 335
 
336
-// newGbtWorkState returns a new instance of a gbtWorkState with all internal
336
+// NewGbtWorkState returns a new instance of a GBTWorkState with all internal
337 337
 // fields initialized and ready to use.
338
-func newGbtWorkState(timeSource blockchain.MedianTimeSource) *gbtWorkState {
339
-	return &gbtWorkState{
338
+func NewGbtWorkState(timeSource blockchain.MedianTimeSource) *GBTWorkState {
339
+	return &GBTWorkState{
340 340
 		notifyMap:  make(map[chainhash.Hash]map[int64]chan struct{}),
341 341
 		timeSource: timeSource,
342 342
 	}
@@ -1408,7 +1408,7 @@ func decodeTemplateID(templateID string) (*chainhash.Hash, int64, error) {
1408 1408
 // notified when block templates are stale.
1409 1409
 //
1410 1410
 // This function MUST be called with the state locked.
1411
-func (state *gbtWorkState) notifyLongPollers(latestHash *chainhash.Hash, lastGenerated time.Time) {
1411
+func (state *GBTWorkState) notifyLongPollers(latestHash *chainhash.Hash, lastGenerated time.Time) {
1412 1412
 	// Notify anything that is waiting for a block template update from a
1413 1413
 	// hash which is not the hash of the tip of the best chain since their
1414 1414
 	// work is now invalid.
@@ -1455,7 +1455,7 @@ func (state *gbtWorkState) notifyLongPollers(latestHash *chainhash.Hash, lastGen
1455 1455
 // NotifyBlockConnected uses the newly-connected block to notify any long poll
1456 1456
 // clients with a new block template when their existing block template is
1457 1457
 // stale due to the newly connected block.
1458
-func (state *gbtWorkState) NotifyBlockConnected(blockHash *chainhash.Hash) {
1458
+func (state *GBTWorkState) NotifyBlockConnected(blockHash *chainhash.Hash) {
1459 1459
 	go func() {
1460 1460
 		state.Lock()
1461 1461
 		defer state.Unlock()
@@ -1468,7 +1468,7 @@ func (state *gbtWorkState) NotifyBlockConnected(blockHash *chainhash.Hash) {
1468 1468
 // pool to notify any long poll clients with a new block template when their
1469 1469
 // existing block template is stale due to enough time passing and the contents
1470 1470
 // of the memory pool changing.
1471
-func (state *gbtWorkState) NotifyMempoolTx(lastUpdated time.Time) {
1471
+func (state *GBTWorkState) NotifyMempoolTx(lastUpdated time.Time) {
1472 1472
 	go func() {
1473 1473
 		state.Lock()
1474 1474
 		defer state.Unlock()
@@ -1494,7 +1494,7 @@ func (state *gbtWorkState) NotifyMempoolTx(lastUpdated time.Time) {
1494 1494
 // without requiring a different channel for each client.
1495 1495
 //
1496 1496
 // This function MUST be called with the state locked.
1497
-func (state *gbtWorkState) templateUpdateChan(prevHash *chainhash.Hash, lastGenerated int64) chan struct{} {
1497
+func (state *GBTWorkState) templateUpdateChan(prevHash *chainhash.Hash, lastGenerated int64) chan struct{} {
1498 1498
 	// Either get the current list of channels waiting for updates about
1499 1499
 	// changes to block template for the previous hash or create a new one.
1500 1500
 	channels, ok := state.notifyMap[*prevHash]
@@ -1527,7 +1527,7 @@ func (state *gbtWorkState) templateUpdateChan(prevHash *chainhash.Hash, lastGene
1527 1527
 // addresses.
1528 1528
 //
1529 1529
 // This function MUST be called with the state locked.
1530
-func (state *gbtWorkState) updateBlockTemplate(s *rpcServer, useCoinbaseValue bool) error {
1530
+func (state *GBTWorkState) updateBlockTemplate(s *rpcServer, useCoinbaseValue bool) error {
1531 1531
 	generator := s.cfg.Generator
1532 1532
 	lastTxUpdate := generator.TxSource().LastUpdated()
1533 1533
 	if lastTxUpdate.IsZero() {
@@ -1655,7 +1655,7 @@ func (state *gbtWorkState) updateBlockTemplate(s *rpcServer, useCoinbaseValue bo
1655 1655
 // and returned to the caller.
1656 1656
 //
1657 1657
 // This function MUST be called with the state locked.
1658
-func (state *gbtWorkState) blockTemplateResult(useCoinbaseValue bool, submitOld *bool) (*btcjson.GetBlockTemplateResult, error) {
1658
+func (state *GBTWorkState) blockTemplateResult(useCoinbaseValue bool, submitOld *bool) (*btcjson.GetBlockTemplateResult, error) {
1659 1659
 	// Ensure the timestamps are still in valid range for the template.
1660 1660
 	// This should really only ever happen if the local clock is changed
1661 1661
 	// after the template is generated, but it's important to avoid serving
@@ -1806,7 +1806,7 @@ func (state *gbtWorkState) blockTemplateResult(useCoinbaseValue bool, submitOld
1806 1806
 //
1807 1807
 // See https://en.bitcoin.it/wiki/BIP_0022 for more details.
1808 1808
 func handleGetBlockTemplateLongPoll(s *rpcServer, longPollID string, useCoinbaseValue bool, closeChan <-chan struct{}) (interface{}, error) {
1809
-	state := s.gbtWorkState
1809
+	state := s.GBTWorkState
1810 1810
 	state.Lock()
1811 1811
 	// The state unlock is intentionally not deferred here since it needs to
1812 1812
 	// be manually unlocked before waiting for a notification about block
@@ -1961,7 +1961,7 @@ func handleGetBlockTemplateRequest(s *rpcServer, request *btcjson.TemplateReques
1961 1961
 	}
1962 1962
 
1963 1963
 	// Protect concurrent access when updating block templates.
1964
-	state := s.gbtWorkState
1964
+	state := s.GBTWorkState
1965 1965
 	state.Lock()
1966 1966
 	defer state.Unlock()
1967 1967
 
@@ -3635,7 +3635,7 @@ type rpcServer struct {
3635 3635
 	statusLines            map[int]string
3636 3636
 	statusLock             sync.RWMutex
3637 3637
 	wg                     sync.WaitGroup
3638
-	gbtWorkState           *gbtWorkState
3638
+	GBTWorkState           *GBTWorkState
3639 3639
 	helpCacher             *helpCacher
3640 3640
 	requestProcessShutdown chan struct{}
3641 3641
 	quit                   chan int
@@ -3736,7 +3736,7 @@ func (s *rpcServer) NotifyNewTransactions(txns []*mempool.TxDesc) {
3736 3736
 
3737 3737
 		// Potentially notify any getblocktemplate long poll clients
3738 3738
 		// about stale block templates due to the new transaction.
3739
-		s.gbtWorkState.NotifyMempoolTx(s.cfg.TxMemPool.LastUpdated())
3739
+		s.GBTWorkState.NotifyMempoolTx(s.cfg.TxMemPool.LastUpdated())
3740 3740
 	}
3741 3741
 }
3742 3742
 
@@ -4300,7 +4300,7 @@ func newRPCServer(cfg *cnf.Config, config *rpcserverConfig) (*rpcServer, error)
4300 4300
 	rpc := rpcServer{
4301 4301
 		cfg:                    *config,
4302 4302
 		statusLines:            make(map[int]string),
4303
-		gbtWorkState:           newGbtWorkState(config.TimeSource),
4303
+		GBTWorkState:           NewGbtWorkState(config.TimeSource),
4304 4304
 		helpCacher:             newHelpCacher(),
4305 4305
 		requestProcessShutdown: make(chan struct{}),
4306 4306
 		quit:                   make(chan int),
@@ -4335,7 +4335,7 @@ func (s *rpcServer) handleBlockchainNotification(notification *blockchain.Notifi
4335 4335
 		// Allow any clients performing long polling via the
4336 4336
 		// getblocktemplate RPC to be notified when the new block causes
4337 4337
 		// their old block template to become stale.
4338
-		s.gbtWorkState.NotifyBlockConnected(block.Hash())
4338
+		s.GBTWorkState.NotifyBlockConnected(block.Hash())
4339 4339
 
4340 4340
 	case blockchain.NTBlockConnected:
4341 4341
 		block, ok := notification.Data.(*btcutil.Block)

+ 2
- 2
btcec/example_test.go View File

@@ -8,8 +8,8 @@ import (
8 8
 	"encoding/hex"
9 9
 	"fmt"
10 10
 
11
-	"github.com/btcsuite/btcd/btcec"
12
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
11
+	"git.parallelcoin.io/dev/btcd/btcec"
12
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
13 13
 )
14 14
 
15 15
 // This example demonstrates signing a message with a secp256k1 private key that

+ 1
- 1
btcjson/btcdextcmds_test.go View File

@@ -12,7 +12,7 @@ import (
12 12
 	"reflect"
13 13
 	"testing"
14 14
 
15
-	"github.com/btcsuite/btcd/btcjson"
15
+	"git.parallelcoin.io/dev/btcd/btcjson"
16 16
 )
17 17
 
18 18
 // TestBtcdExtCmds tests all of the btcd extended commands marshal and unmarshal

+ 1
- 1
btcjson/btcdextresults_test.go View File

@@ -9,7 +9,7 @@ import (
9 9
 	"encoding/json"
10 10
 	"testing"
11 11
 
12
-	"github.com/btcsuite/btcd/btcjson"
12
+	"git.parallelcoin.io/dev/btcd/btcjson"
13 13
 )
14 14
 
15 15
 // TestBtcdExtCustomResults ensures any results that have custom marshalling

+ 1
- 1
btcjson/btcwalletextcmds_test.go View File

@@ -11,7 +11,7 @@ import (
11 11
 	"reflect"
12 12
 	"testing"
13 13
 
14
-	"github.com/btcsuite/btcd/btcjson"
14
+	"git.parallelcoin.io/dev/btcd/btcjson"
15 15
 )
16 16
 
17 17
 // TestBtcWalletExtCmds tests all of the btcwallet extended commands marshal and

+ 2
- 2
btcjson/chainsvrcmds_test.go View File

@@ -11,8 +11,8 @@ import (
11 11
 	"reflect"
12 12
 	"testing"
13 13
 
14
-	"github.com/btcsuite/btcd/btcjson"
15
-	"github.com/btcsuite/btcd/wire"
14
+	"git.parallelcoin.io/dev/btcd/btcjson"
15
+	"git.parallelcoin.io/dev/btcd/wire"
16 16
 )
17 17
 
18 18
 // TestChainSvrCmds tests all of the chain server commands marshal and unmarshal

+ 1
- 1
btcjson/chainsvrresults_test.go View File

@@ -8,7 +8,7 @@ import (
8 8
 	"encoding/json"
9 9
 	"testing"
10 10
 
11
-	"github.com/btcsuite/btcd/btcjson"
11
+	"git.parallelcoin.io/dev/btcd/btcjson"
12 12
 )
13 13
 
14 14
 // TestChainSvrCustomResults ensures any results that have custom marshalling

+ 1
- 1
btcjson/chainsvrwscmds_test.go View File

@@ -12,7 +12,7 @@ import (
12 12
 	"reflect"
13 13
 	"testing"
14 14
 
15
-	"github.com/btcsuite/btcd/btcjson"
15
+	"git.parallelcoin.io/dev/btcd/btcjson"
16 16
 )
17 17
 
18 18
 // TestChainSvrWsCmds tests all of the chain server websocket-specific commands

+ 1
- 1
btcjson/chainsvrwsntfns_test.go View File

@@ -12,7 +12,7 @@ import (
12 12
 	"reflect"
13 13
 	"testing"
14 14
 
15
-	"github.com/btcsuite/btcd/btcjson"
15
+	"git.parallelcoin.io/dev/btcd/btcjson"
16 16
 )
17 17
 
18 18
 // TestChainSvrWsNtfns tests all of the chain server websocket-specific

+ 1
- 1
btcjson/chainsvrwsresults_test.go View File

@@ -9,7 +9,7 @@ import (
9 9
 	"encoding/json"
10 10
 	"testing"
11 11
 
12
-	"github.com/btcsuite/btcd/btcjson"
12
+	"git.parallelcoin.io/dev/btcd/btcjson"
13 13
 )
14 14
 
15 15
 // TestChainSvrWsResults ensures any results that have custom marshalling

+ 1
- 1
btcjson/cmdinfo_test.go View File

@@ -8,7 +8,7 @@ import (
8 8
 	"reflect"
9 9
 	"testing"
10 10
 
11
-	"github.com/btcsuite/btcd/btcjson"
11
+	"git.parallelcoin.io/dev/btcd/btcjson"
12 12
 )
13 13
 
14 14
 // TestCmdMethod tests the CmdMethod function to ensure it retunrs the expected

+ 1
- 1
btcjson/cmdparse_test.go View File

@@ -10,7 +10,7 @@ import (
10 10
 	"reflect"
11 11
 	"testing"
12 12
 
13
-	"github.com/btcsuite/btcd/btcjson"
13
+	"git.parallelcoin.io/dev/btcd/btcjson"
14 14
 )
15 15
 
16 16
 // TestAssignField tests the assignField function handles supported combinations

+ 1
- 1
btcjson/error_test.go View File

@@ -7,7 +7,7 @@ package btcjson_test
7 7
 import (
8 8
 	"testing"
9 9
 
10
-	"github.com/btcsuite/btcd/btcjson"
10
+	"git.parallelcoin.io/dev/btcd/btcjson"
11 11
 )
12 12
 
13 13
 // TestErrorCodeStringer tests the stringized output for the ErrorCode type.

+ 1
- 1
btcjson/example_test.go View File

@@ -8,7 +8,7 @@ import (
8 8
 	"encoding/json"
9 9
 	"fmt"
10 10
 
11
-	"github.com/btcsuite/btcd/btcjson"
11
+	"git.parallelcoin.io/dev/btcd/btcjson"
12 12
 )
13 13
 
14 14
 // This example demonstrates how to create and marshal a command into a JSON-RPC

+ 1
- 1
btcjson/help_test.go View File

@@ -8,7 +8,7 @@ import (
8 8
 	"reflect"
9 9
 	"testing"
10 10
 
11
-	"github.com/btcsuite/btcd/btcjson"
11
+	"git.parallelcoin.io/dev/btcd/btcjson"
12 12
 )
13 13
 
14 14
 // TestHelpReflectInternals ensures the various help functions which deal with

+ 1
- 1
btcjson/helpers_test.go View File

@@ -8,7 +8,7 @@ import (
8 8
 	"reflect"
9 9
 	"testing"
10 10
 
11
-	"github.com/btcsuite/btcd/btcjson"
11
+	"git.parallelcoin.io/dev/btcd/btcjson"
12 12
 )
13 13
 
14 14
 // TestHelpers tests the various helper functions which create pointers to

+ 1
- 1
btcjson/jsonrpc_test.go View File

@@ -9,7 +9,7 @@ import (
9 9
 	"reflect"
10 10
 	"testing"
11 11
 
12
-	"github.com/btcsuite/btcd/btcjson"
12
+	"git.parallelcoin.io/dev/btcd/btcjson"
13 13
 )
14 14
 
15 15
 // TestIsValidIDType ensures the IsValidIDType function behaves as expected.

+ 1
- 1
btcjson/register_test.go View File

@@ -9,7 +9,7 @@ import (
9 9
 	"sort"
10 10
 	"testing"
11 11
 
12
-	"github.com/btcsuite/btcd/btcjson"
12
+	"git.parallelcoin.io/dev/btcd/btcjson"
13 13
 )
14 14
 
15 15
 // TestUsageFlagStringer tests the stringized output for the UsageFlag type.

+ 1
- 1
btcjson/walletsvrcmds_test.go View File

@@ -11,7 +11,7 @@ import (
11 11
 	"reflect"
12 12
 	"testing"
13 13
 
14
-	"github.com/btcsuite/btcd/btcjson"
14
+	"git.parallelcoin.io/dev/btcd/btcjson"
15 15
 )
16 16
 
17 17
 // TestWalletSvrCmds tests all of the wallet server commands marshal and

+ 1
- 1
btcjson/walletsvrwscmds_test.go View File

@@ -11,7 +11,7 @@ import (
11 11
 	"reflect"
12 12
 	"testing"
13 13
 
14
-	"github.com/btcsuite/btcd/btcjson"
14
+	"git.parallelcoin.io/dev/btcd/btcjson"
15 15
 )
16 16
 
17 17
 // TestWalletSvrWsCmds tests all of the wallet server websocket-specific

+ 1
- 1
btcjson/walletsvrwsntfns_test.go View File

@@ -11,7 +11,7 @@ import (
11 11
 	"reflect"
12 12
 	"testing"
13 13
 
14
-	"github.com/btcsuite/btcd/btcjson"
14
+	"git.parallelcoin.io/dev/btcd/btcjson"
15 15
 )
16 16
 
17 17
 // TestWalletSvrWsNtfns tests all of the chain server websocket-specific

+ 1
- 1
btcutil/address_test.go View File

@@ -12,7 +12,7 @@ import (
12 12
 	"strings"
13 13
 	"testing"
14 14
 
15
-	"github.com/btcsuite/btcd/chaincfg"
15
+	"git.parallelcoin.io/dev/btcd/chaincfg"
16 16
 	"github.com/btcsuite/btcutil"
17 17
 	"golang.org/x/crypto/ripemd160"
18 18
 )

+ 7
- 7
btcutil/block_test.go View File

@@ -11,8 +11,8 @@ import (
11 11
 	"testing"
12 12
 	"time"
13 13
 
14
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
15
-	"github.com/btcsuite/btcd/wire"
14
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
15
+	"git.parallelcoin.io/dev/btcd/wire"
16 16
 	"github.com/btcsuite/btcutil"
17 17
 	"github.com/davecgh/go-spew/spew"
18 18
 )
@@ -400,7 +400,7 @@ var Block100000 = wire.MsgBlock{
400 400
 					PkScript: []byte{
401 401
 						0x76, // OP_DUP
402 402
 						0xa9, // OP_HASH160
403
-						0x14, // OP_DATA_20
403
+						0x14, // OpData20
404 404
 						0xc3, 0x98, 0xef, 0xa9, 0xc3, 0x92, 0xba, 0x60,
405 405
 						0x13, 0xc5, 0xe0, 0x4e, 0xe7, 0x29, 0x75, 0x5e,
406 406
 						0xf7, 0xf5, 0x8b, 0x32,
@@ -413,7 +413,7 @@ var Block100000 = wire.MsgBlock{
413 413
 					PkScript: []byte{
414 414
 						0x76, // OP_DUP
415 415
 						0xa9, // OP_HASH160
416
-						0x14, // OP_DATA_20
416
+						0x14, // OpData20
417 417
 						0x94, 0x8c, 0x76, 0x5a, 0x69, 0x14, 0xd4, 0x3f,
418 418
 						0x2a, 0x7a, 0xc1, 0x77, 0xda, 0x2c, 0x2f, 0x6b,
419 419
 						0x52, 0xde, 0x3d, 0x7c,
@@ -468,7 +468,7 @@ var Block100000 = wire.MsgBlock{
468 468
 					PkScript: []byte{
469 469
 						0x76, // OP_DUP
470 470
 						0xa9, // OP_HASH160
471
-						0x14, // OP_DATA_20
471
+						0x14, // OpData20
472 472
 						0xb0, 0xdc, 0xbf, 0x97, 0xea, 0xbf, 0x44, 0x04,
473 473
 						0xe3, 0x1d, 0x95, 0x24, 0x77, 0xce, 0x82, 0x2d,
474 474
 						0xad, 0xbe, 0x7e, 0x10,
@@ -481,7 +481,7 @@ var Block100000 = wire.MsgBlock{
481 481
 					PkScript: []byte{
482 482
 						0x76, // OP_DUP
483 483
 						0xa9, // OP_HASH160
484
-						0x14, // OP_DATA_20
484
+						0x14, // OpData20
485 485
 						0x6b, 0x12, 0x81, 0xee, 0xc2, 0x5a, 0xb4, 0xe1,
486 486
 						0xe0, 0x79, 0x3f, 0xf4, 0xe0, 0x8a, 0xb1, 0xab,
487 487
 						0xb3, 0x40, 0x9c, 0xd9,
@@ -537,7 +537,7 @@ var Block100000 = wire.MsgBlock{
537 537
 					PkScript: []byte{
538 538
 						0x76, // OP_DUP
539 539
 						0xa9, // OP_HASH160
540
-						0x14, // OP_DATA_20
540
+						0x14, // OpData20
541 541
 						0x39, 0xaa, 0x3d, 0x56, 0x9e, 0x06, 0xa1, 0xd7,
542 542
 						0x92, 0x6d, 0xc4, 0xbe, 0x11, 0x93, 0xc9, 0x9b,
543 543
 						0xf2, 0xeb, 0x9e, 0xe0,

+ 2
- 2
btcutil/bloom/example_test.go View File

@@ -9,8 +9,8 @@ import (
9 9
 	"math/rand"
10 10
 	"time"
11 11
 
12
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
13
-	"github.com/btcsuite/btcd/wire"
12
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
13
+	"git.parallelcoin.io/dev/btcd/wire"
14 14
 	"github.com/btcsuite/btcutil/bloom"
15 15
 )
16 16
 

+ 2
- 2
btcutil/bloom/filter_test.go View File

@@ -9,8 +9,8 @@ import (
9 9
 	"encoding/hex"
10 10
 	"testing"
11 11
 
12
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
13
-	"github.com/btcsuite/btcd/wire"
12
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
13
+	"git.parallelcoin.io/dev/btcd/wire"
14 14
 	"github.com/btcsuite/btcutil"
15 15
 	"github.com/btcsuite/btcutil/bloom"
16 16
 )

+ 2
- 2
btcutil/bloom/merkleblock_test.go View File

@@ -9,8 +9,8 @@ import (
9 9
 	"encoding/hex"
10 10
 	"testing"
11 11
 
12
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
13
-	"github.com/btcsuite/btcd/wire"
12
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
13
+	"git.parallelcoin.io/dev/btcd/wire"
14 14
 	"github.com/btcsuite/btcutil"
15 15
 	"github.com/btcsuite/btcutil/bloom"
16 16
 )

+ 2
- 2
btcutil/coinset/coins_test.go View File

@@ -11,8 +11,8 @@ import (
11 11
 	"fmt"
12 12
 	"testing"
13 13
 
14
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
15
-	"github.com/btcsuite/btcd/wire"
14
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
15
+	"git.parallelcoin.io/dev/btcd/wire"
16 16
 	"github.com/btcsuite/btcutil"
17 17
 	"github.com/btcsuite/btcutil/coinset"
18 18
 )

+ 4
- 4
btcutil/gcs/builder/builder_test.go View File

@@ -9,10 +9,10 @@ import (
9 9
 	"encoding/hex"
10 10
 	"testing"
11 11
 
12
-	"github.com/btcsuite/btcd/chaincfg"
13
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
14
-	"github.com/btcsuite/btcd/txscript"
15
-	"github.com/btcsuite/btcd/wire"
12
+	"git.parallelcoin.io/dev/btcd/chaincfg"
13
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
14
+	"git.parallelcoin.io/dev/btcd/txscript"
15
+	"git.parallelcoin.io/dev/btcd/wire"
16 16
 	"github.com/btcsuite/btcutil"
17 17
 	"github.com/btcsuite/btcutil/gcs"
18 18
 	"github.com/btcsuite/btcutil/gcs/builder"

+ 1
- 1
btcutil/hdkeychain/example_test.go View File

@@ -7,7 +7,7 @@ package hdkeychain_test
7 7
 import (
8 8
 	"fmt"
9 9
 
10
-	"github.com/btcsuite/btcd/chaincfg"
10
+	"git.parallelcoin.io/dev/btcd/chaincfg"
11 11
 	"github.com/btcsuite/btcutil/hdkeychain"
12 12
 )
13 13
 

+ 1
- 1
btcutil/hdkeychain/extendedkey_test.go View File

@@ -16,7 +16,7 @@ import (
16 16
 	"reflect"
17 17
 	"testing"
18 18
 
19
-	"github.com/btcsuite/btcd/chaincfg"
19
+	"git.parallelcoin.io/dev/btcd/chaincfg"
20 20
 )
21 21
 
22 22
 // TestBIP0032Vectors tests the vectors provided by [BIP32] to ensure the

+ 1
- 1
btcutil/internal_test.go View File

@@ -12,7 +12,7 @@ interface. The functions are only exported while the tests are being run.
12 12
 package btcutil
13 13
 
14 14
 import (
15
-	"github.com/btcsuite/btcd/btcec"
15
+	"git.parallelcoin.io/dev/btcd/btcec"
16 16
 	"github.com/btcsuite/btcutil/base58"
17 17
 	"github.com/btcsuite/btcutil/bech32"
18 18
 	"golang.org/x/crypto/ripemd160"

+ 1
- 1
btcutil/tx_test.go View File

@@ -10,7 +10,7 @@ import (
10 10
 	"reflect"
11 11
 	"testing"
12 12
 
13
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
13
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
14 14
 	"github.com/btcsuite/btcutil"
15 15
 	"github.com/davecgh/go-spew/spew"
16 16
 )

+ 1
- 1
btcutil/txsort/txsort_test.go View File

@@ -11,7 +11,7 @@ import (
11 11
 	"path/filepath"
12 12
 	"testing"
13 13
 
14
-	"github.com/btcsuite/btcd/wire"
14
+	"git.parallelcoin.io/dev/btcd/wire"
15 15
 	"github.com/btcsuite/btcutil/txsort"
16 16
 )
17 17
 

+ 2
- 2
btcutil/wif_test.go View File

@@ -7,8 +7,8 @@ package btcutil_test
7 7
 import (
8 8
 	"testing"
9 9
 
10
-	"github.com/btcsuite/btcd/btcec"
11
-	"github.com/btcsuite/btcd/chaincfg"
10
+	"git.parallelcoin.io/dev/btcd/btcec"
11
+	"git.parallelcoin.io/dev/btcd/chaincfg"
12 12
 	. "github.com/btcsuite/btcutil"
13 13
 )
14 14
 

+ 1
- 1
chaincfg/register_test.go View File

@@ -6,7 +6,7 @@ import (
6 6
 	"strings"
7 7
 	"testing"
8 8
 
9
-	. "github.com/btcsuite/btcd/chaincfg"
9
+	. "git.parallelcoin.io/dev/btcd/chaincfg"
10 10
 )
11 11
 
12 12
 // Define some of the required parameters for a user-registered

+ 2
- 2
database/driver_test.go View File

@@ -8,8 +8,8 @@ import (
8 8
 	"fmt"
9 9
 	"testing"
10 10
 
11
-	"github.com/btcsuite/btcd/database"
12
-	_ "github.com/btcsuite/btcd/database/ffldb"
11
+	"git.parallelcoin.io/dev/btcd/database"
12
+	_ "git.parallelcoin.io/dev/btcd/database/ffldb"
13 13
 )
14 14
 
15 15
 var (

+ 1
- 1
database/error_test.go View File

@@ -8,7 +8,7 @@ import (
8 8
 	"errors"
9 9
 	"testing"
10 10
 
11
-	"github.com/btcsuite/btcd/database"
11
+	"git.parallelcoin.io/dev/btcd/database"
12 12
 )
13 13
 
14 14
 // TestErrorCodeStringer tests the stringized output for the ErrorCode type.

+ 10
- 10
database/example_test.go View File

@@ -10,10 +10,10 @@ import (
10 10
 	"os"
11 11
 	"path/filepath"
12 12
 
13
-	"github.com/btcsuite/btcd/chaincfg"
14
-	"github.com/btcsuite/btcd/database"
15
-	_ "github.com/btcsuite/btcd/database/ffldb"
16
-	"github.com/btcsuite/btcd/wire"
13
+	"git.parallelcoin.io/dev/btcd/chaincfg"
14
+	"git.parallelcoin.io/dev/btcd/database"
15
+	_ "git.parallelcoin.io/dev/btcd/database/ffldb"
16
+	"git.parallelcoin.io/dev/btcd/wire"
17 17
 	"github.com/btcsuite/btcutil"
18 18
 )
19 19
 
@@ -22,8 +22,8 @@ func ExampleCreate() {
22 22
 	// This example assumes the ffldb driver is imported.
23 23
 	//
24 24
 	// import (
25
-	// 	"github.com/btcsuite/btcd/database"
26
-	// 	_ "github.com/btcsuite/btcd/database/ffldb"
25
+	// 	"git.parallelcoin.io/dev/btcd/database"
26
+	// 	_ "git.parallelcoin.io/dev/btcd/database/ffldb"
27 27
 	// )
28 28
 
29 29
 	// Create a database and schedule it to be closed and removed on exit.
@@ -48,8 +48,8 @@ func Example_basicUsage() {
48 48
 	// This example assumes the ffldb driver is imported.
49 49
 	//
50 50
 	// import (
51
-	// 	"github.com/btcsuite/btcd/database"
52
-	// 	_ "github.com/btcsuite/btcd/database/ffldb"
51
+	// 	"git.parallelcoin.io/dev/btcd/database"
52
+	// 	_ "git.parallelcoin.io/dev/btcd/database/ffldb"
53 53
 	// )
54 54
 
55 55
 	// Create a database and schedule it to be closed and removed on exit.
@@ -114,8 +114,8 @@ func Example_blockStorageAndRetrieval() {
114 114
 	// This example assumes the ffldb driver is imported.
115 115
 	//
116 116
 	// import (
117
-	// 	"github.com/btcsuite/btcd/database"
118
-	// 	_ "github.com/btcsuite/btcd/database/ffldb"
117
+	// 	"git.parallelcoin.io/dev/btcd/database"
118
+	// 	_ "git.parallelcoin.io/dev/btcd/database/ffldb"
119 119
 	// )
120 120
 
121 121
 	// Create a database and schedule it to be closed and removed on exit.

+ 2
- 2
database/ffldb/bench_test.go View File

@@ -9,8 +9,8 @@ import (
9 9
 	"path/filepath"
10 10
 	"testing"
11 11
 
12
-	"github.com/btcsuite/btcd/chaincfg"
13
-	"github.com/btcsuite/btcd/database"
12
+	"git.parallelcoin.io/dev/btcd/chaincfg"
13
+	"git.parallelcoin.io/dev/btcd/database"
14 14
 	"github.com/btcsuite/btcutil"
15 15
 )
16 16
 

+ 3
- 3
database/ffldb/driver_test.go View File

@@ -12,9 +12,9 @@ import (
12 12
 	"runtime"
13 13
 	"testing"
14 14
 
15
-	"github.com/btcsuite/btcd/chaincfg"
16
-	"github.com/btcsuite/btcd/database"
17
-	"github.com/btcsuite/btcd/database/ffldb"
15
+	"git.parallelcoin.io/dev/btcd/chaincfg"
16
+	"git.parallelcoin.io/dev/btcd/database"
17
+	"git.parallelcoin.io/dev/btcd/database/ffldb"
18 18
 	"github.com/btcsuite/btcutil"
19 19
 )
20 20
 

+ 1
- 1
database/ffldb/export_test.go View File

@@ -11,7 +11,7 @@ The functions are only exported while the tests are being run.
11 11
 
12 12
 package ffldb
13 13
 
14
-import "github.com/btcsuite/btcd/database"
14
+import "git.parallelcoin.io/dev/btcd/database"
15 15
 
16 16
 // TstRunWithMaxBlockFileSize runs the passed function with the maximum allowed
17 17
 // file size for the database set to the provided value.  The value will be set

+ 4
- 4
database/ffldb/interface_test.go View File

@@ -25,10 +25,10 @@ import (
25 25
 	"testing"
26 26
 	"time"
27 27
 
28
-	"github.com/btcsuite/btcd/chaincfg"
29
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
30
-	"github.com/btcsuite/btcd/database"
31
-	"github.com/btcsuite/btcd/wire"
28
+	"git.parallelcoin.io/dev/btcd/chaincfg"
29
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
30
+	"git.parallelcoin.io/dev/btcd/database"
31
+	"git.parallelcoin.io/dev/btcd/wire"
32 32
 	"github.com/btcsuite/btcutil"
33 33
 )
34 34
 

+ 3
- 3
database/ffldb/whitebox_test.go View File

@@ -17,9 +17,9 @@ import (
17 17
 	"path/filepath"
18 18
 	"testing"
19 19
 
20
-	"github.com/btcsuite/btcd/chaincfg"
21
-	"github.com/btcsuite/btcd/database"
22
-	"github.com/btcsuite/btcd/wire"
20
+	"git.parallelcoin.io/dev/btcd/chaincfg"
21
+	"git.parallelcoin.io/dev/btcd/database"
22
+	"git.parallelcoin.io/dev/btcd/wire"
23 23
 	"github.com/btcsuite/btcutil"
24 24
 	"github.com/btcsuite/goleveldb/leveldb"
25 25
 	ldberrors "github.com/btcsuite/goleveldb/leveldb/errors"

+ 4
- 4
docs/README.md View File

@@ -95,8 +95,8 @@ recommended that `GOPATH` is set to a directory in your home directory such as
95 95
 - Run the following commands to obtain btcd, all dependencies, and install it:
96 96
 
97 97
 ```bash
98
-$ git clone https://github.com/btcsuite/btcd $GOPATH/src/github.com/btcsuite/btcd
99
-$ cd $GOPATH/src/github.com/btcsuite/btcd
98
+$ git clone https://git.parallelcoin.io/dev/btcd $GOPATH/src/git.parallelcoin.io/dev/btcd
99
+$ cd $GOPATH/src/git.parallelcoin.io/dev/btcd
100 100
 $ GO111MODULE=on go install -v . ./cmd/...
101 101
 ```
102 102
 
@@ -109,7 +109,7 @@ $ GO111MODULE=on go install -v . ./cmd/...
109 109
 - Run the following commands to update btcd, all dependencies, and install it:
110 110
 
111 111
 ```bash
112
-$ cd $GOPATH/src/github.com/btcsuite/btcd
112
+$ cd $GOPATH/src/git.parallelcoin.io/dev/btcd
113 113
 $ git pull && GO111MODULE=on go install -v . ./cmd/...
114 114
 ```
115 115
 
@@ -126,7 +126,7 @@ $ git pull && GO111MODULE=on go install -v . ./cmd/...
126 126
 
127 127
 **2.2 Configuration**
128 128
 
129
-btcd has a number of [configuration](http://godoc.org/github.com/btcsuite/btcd)
129
+btcd has a number of [configuration](http://godoc.org/git.parallelcoin.io/dev/btcd)
130 130
 options, which can be viewed by running: `$ btcd --help`.
131 131
 
132 132
 <a name="BtcctlConfig" />

+ 4
- 4
integration/bip0009_test.go View File

@@ -13,10 +13,10 @@ import (
13 13
 	"testing"
14 14
 	"time"
15 15
 
16
-	"github.com/btcsuite/btcd/blockchain"
17
-	"github.com/btcsuite/btcd/chaincfg"
18
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
19
-	"github.com/btcsuite/btcd/integration/rpctest"
16
+	"git.parallelcoin.io/dev/btcd/blockchain"
17
+	"git.parallelcoin.io/dev/btcd/chaincfg"
18
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
19
+	"git.parallelcoin.io/dev/btcd/integration/rpctest"
20 20
 )
21 21
 
22 22
 const (

+ 7
- 7
integration/csv_fork_test.go View File

@@ -14,13 +14,13 @@ import (
14 14
 	"testing"
15 15
 	"time"
16 16
 
17
-	"github.com/btcsuite/btcd/blockchain"
18
-	"github.com/btcsuite/btcd/btcec"
19
-	"github.com/btcsuite/btcd/chaincfg"
20
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
21
-	"github.com/btcsuite/btcd/integration/rpctest"
22
-	"github.com/btcsuite/btcd/txscript"
23
-	"github.com/btcsuite/btcd/wire"
17
+	"git.parallelcoin.io/dev/btcd/blockchain"
18
+	"git.parallelcoin.io/dev/btcd/btcec"
19
+	"git.parallelcoin.io/dev/btcd/chaincfg"
20
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
21
+	"git.parallelcoin.io/dev/btcd/integration/rpctest"
22
+	"git.parallelcoin.io/dev/btcd/txscript"
23
+	"git.parallelcoin.io/dev/btcd/wire"
24 24
 	"github.com/btcsuite/btcutil"
25 25
 )
26 26
 

+ 2
- 2
integration/rpcserver_test.go View File

@@ -14,8 +14,8 @@ import (
14 14
 	"runtime/debug"
15 15
 	"testing"
16 16
 
17
-	"github.com/btcsuite/btcd/chaincfg"
18
-	"github.com/btcsuite/btcd/integration/rpctest"
17
+	"git.parallelcoin.io/dev/btcd/chaincfg"
18
+	"git.parallelcoin.io/dev/btcd/integration/rpctest"
19 19
 )
20 20
 
21 21
 func testGetBestBlock(r *rpctest.Harness, t *testing.T) {

+ 1
- 1
integration/rpctest/memwallet.go View File

@@ -385,7 +385,7 @@ func (m *memWallet) fundTx(tx *wire.MsgTx, amt btcutil.Amount,
385 385
 
386 386
 	const (
387 387
 		// spendSize is the largest number of bytes of a sigScript
388
-		// which spends a p2pkh output: OP_DATA_73 <sig> OP_DATA_33 <pubkey>
388
+		// which spends a p2pkh output: OP_DATA_73 <sig> OpData33 <pubkey>
389 389
 		spendSize = 1 + 73 + 1 + 33
390 390
 	)
391 391
 

+ 4
- 4
integration/rpctest/rpc_harness_test.go View File

@@ -13,10 +13,10 @@ import (
13 13
 	"testing"
14 14
 	"time"
15 15
 
16
-	"github.com/btcsuite/btcd/chaincfg"
17
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
18
-	"github.com/btcsuite/btcd/txscript"
19
-	"github.com/btcsuite/btcd/wire"
16
+	"git.parallelcoin.io/dev/btcd/chaincfg"
17
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
18
+	"git.parallelcoin.io/dev/btcd/txscript"
19
+	"git.parallelcoin.io/dev/btcd/wire"
20 20
 	"github.com/btcsuite/btcutil"
21 21
 )
22 22
 

+ 1
- 1
main.go View File

@@ -41,7 +41,7 @@ func main() {
41 41
 	}
42 42
 
43 43
 	// Work around defer not working after os.Exit()
44
-	if err := btcd.BtcdMain(nil); err != nil {
44
+	if err := btcd.Main(nil); err != nil {
45 45
 		os.Exit(1)
46 46
 	}
47 47
 }

+ 3
- 3
mempool/estimatefee_test.go View File

@@ -9,9 +9,9 @@ import (
9 9
 	"math/rand"
10 10
 	"testing"
11 11
 
12
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
13
-	"github.com/btcsuite/btcd/mining"
14
-	"github.com/btcsuite/btcd/wire"
12
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
13
+	"git.parallelcoin.io/dev/btcd/mining"
14
+	"git.parallelcoin.io/dev/btcd/wire"
15 15
 	"github.com/btcsuite/btcutil"
16 16
 )
17 17
 

+ 6
- 6
mempool/mempool_test.go View File

@@ -12,12 +12,12 @@ import (
12 12
 	"testing"
13 13
 	"time"
14 14
 
15
-	"github.com/btcsuite/btcd/blockchain"
16
-	"github.com/btcsuite/btcd/btcec"
17
-	"github.com/btcsuite/btcd/chaincfg"
18
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
19
-	"github.com/btcsuite/btcd/txscript"
20
-	"github.com/btcsuite/btcd/wire"
15
+	"git.parallelcoin.io/dev/btcd/blockchain"
16
+	"git.parallelcoin.io/dev/btcd/btcec"
17
+	"git.parallelcoin.io/dev/btcd/chaincfg"
18
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
19
+	"git.parallelcoin.io/dev/btcd/txscript"
20
+	"git.parallelcoin.io/dev/btcd/wire"
21 21
 	"github.com/btcsuite/btcutil"
22 22
 )
23 23
 

+ 7
- 7
mempool/policy.go View File

@@ -25,14 +25,14 @@ const (
25 25
 	// value allows for a 15-of-15 CHECKMULTISIG pay-to-script-hash with
26 26
 	// compressed keys.
27 27
 	//
28
-	// The form of the overall script is: OP_0 <15 signatures> OP_PUSHDATA2
28
+	// The form of the overall script is: OpZero <15 signatures> OP_PUSHDATA2
29 29
 	// <2 bytes len> [OP_15 <15 pubkeys> OP_15 OP_CHECKMULTISIG]
30 30
 	//
31 31
 	// For the p2sh script portion, each of the 15 compressed pubkeys are
32
-	// 33 bytes (plus one for the OP_DATA_33 opcode), and the thus it totals
32
+	// 33 bytes (plus one for the OpData33 opcode), and the thus it totals
33 33
 	// to (15*34)+3 = 513 bytes.  Next, each of the 15 signatures is a max
34 34
 	// of 73 bytes (plus one for the OP_DATA_73 opcode).  Also, there is one
35
-	// extra byte for the initial extra OP_0 push and 3 bytes for the
35
+	// extra byte for the initial extra OpZero push and 3 bytes for the
36 36
 	// OP_PUSHDATA2 needed to specify the 513 bytes for the script push.
37 37
 	// That brings the total to 1+(15*74)+3+513 = 1627.  This value also
38 38
 	// adds a few extra bytes to provide a little buffer.
@@ -188,11 +188,11 @@ func isDust(txOut *wire.TxOut, minRelayTxFee btcutil.Amount) bool {
188 188
 	//
189 189
 	//  Output to hash (34 bytes):
190 190
 	//   8 value, 1 script len, 25 script [1 OP_DUP, 1 OP_HASH_160,
191
-	//   1 OP_DATA_20, 20 hash, 1 OP_EQUALVERIFY, 1 OP_CHECKSIG]
191
+	//   1 OpData20, 20 hash, 1 OP_EQUALVERIFY, 1 OP_CHECKSIG]
192 192
 	//
193 193
 	//  Input with compressed pubkey (148 bytes):
194 194
 	//   36 prev outpoint, 1 script len, 107 script [1 OP_DATA_72, 72 sig,
195
-	//   1 OP_DATA_33, 33 compressed pubkey], 4 sequence
195
+	//   1 OpData33, 33 compressed pubkey], 4 sequence
196 196
 	//
197 197
 	//  Input with uncompressed pubkey (180 bytes):
198 198
 	//   36 prev outpoint, 1 script len, 139 script [1 OP_DATA_72, 72 sig,
@@ -201,7 +201,7 @@ func isDust(txOut *wire.TxOut, minRelayTxFee btcutil.Amount) bool {
201 201
 	// Pay-to-pubkey bytes breakdown:
202 202
 	//
203 203
 	//  Output to compressed pubkey (44 bytes):
204
-	//   8 value, 1 script len, 35 script [1 OP_DATA_33,
204
+	//   8 value, 1 script len, 35 script [1 OpData33,
205 205
 	//   33 compressed pubkey, 1 OP_CHECKSIG]
206 206
 	//
207 207
 	//  Output to uncompressed pubkey (76 bytes):
@@ -215,7 +215,7 @@ func isDust(txOut *wire.TxOut, minRelayTxFee btcutil.Amount) bool {
215 215
 	// Pay-to-witness-pubkey-hash bytes breakdown:
216 216
 	//
217 217
 	//  Output to witness key hash (31 bytes);
218
-	//   8 value, 1 script len, 22 script [1 OP_0, 1 OP_DATA_20,
218
+	//   8 value, 1 script len, 22 script [1 OpZero, 1 OpData20,
219 219
 	//   20 bytes hash160]
220 220
 	//
221 221
 	//  Input (67 bytes as the 107 witness stack is discounted):

+ 7
- 7
mempool/policy_test.go View File

@@ -9,11 +9,11 @@ import (
9 9
 	"testing"
10 10
 	"time"
11 11
 
12
-	"github.com/btcsuite/btcd/btcec"
13
-	"github.com/btcsuite/btcd/chaincfg"
14
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
15
-	"github.com/btcsuite/btcd/txscript"
16
-	"github.com/btcsuite/btcd/wire"
12
+	"git.parallelcoin.io/dev/btcd/btcec"
13
+	"git.parallelcoin.io/dev/btcd/chaincfg"
14
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
15
+	"git.parallelcoin.io/dev/btcd/txscript"
16
+	"git.parallelcoin.io/dev/btcd/wire"
17 17
 	"github.com/btcsuite/btcutil"
18 18
 )
19 19
 
@@ -158,7 +158,7 @@ func TestCheckPkScriptStandard(t *testing.T) {
158 158
 		},
159 159
 		{
160 160
 			"malformed3",
161
-			txscript.NewScriptBuilder().AddOp(txscript.OP_0).
161
+			txscript.NewScriptBuilder().AddOp(txscript.OpZero).
162 162
 				AddData(pubKeys[0]).AddData(pubKeys[1]).
163 163
 				AddOp(txscript.OP_2).AddOp(txscript.OP_CHECKMULTISIG),
164 164
 			false,
@@ -167,7 +167,7 @@ func TestCheckPkScriptStandard(t *testing.T) {
167 167
 			"malformed4",
168 168
 			txscript.NewScriptBuilder().AddOp(txscript.OP_1).
169 169
 				AddData(pubKeys[0]).AddData(pubKeys[1]).
170
-				AddOp(txscript.OP_0).AddOp(txscript.OP_CHECKMULTISIG),
170
+				AddOp(txscript.OpZero).AddOp(txscript.OP_CHECKMULTISIG),
171 171
 			false,
172 172
 		},
173 173
 		{

+ 1
- 1
mining/mining.go View File

@@ -824,7 +824,7 @@ mempoolLoop:
824 824
 		// The witness commitment itself is the double-sha256 of the
825 825
 		// witness preimage generated above. With the commitment
826 826
 		// generated, the witness script for the output is: OP_RETURN
827
-		// OP_DATA_36 {0xaa21a9ed || witnessCommitment}. The leading
827
+		// OpData36 {0xaa21a9ed || witnessCommitment}. The leading
828 828
 		// prefix is referred to as the "witness magic bytes".
829 829
 		witnessCommitment = chainhash.DoubleHashB(witnessPreimage[:])
830 830
 		witnessScript := append(blockchain.WitnessMagicBytes, witnessCommitment...)

+ 1
- 1
mining/policy.go View File

@@ -111,7 +111,7 @@ func CalcPriority(tx *wire.MsgTx, utxoView *blockchain.UtxoViewpoint, nextBlockH
111 111
 	//
112 112
 	// A compressed pubkey pay-to-script-hash redemption with a maximum len
113 113
 	// signature is of the form:
114
-	// [OP_DATA_73 <73-byte sig> + OP_DATA_35 + {OP_DATA_33
114
+	// [OP_DATA_73 <73-byte sig> + OpData35 + {OpData33
115 115
 	// <33 byte compresed pubkey> + OP_CHECKSIG}]
116 116
 	//
117 117
 	// Thus 1 + 73 + 1 + 1 + 33 + 1 = 110

+ 3
- 3
mining/policy_test.go View File

@@ -8,9 +8,9 @@ import (
8 8
 	"encoding/hex"
9 9
 	"testing"
10 10
 
11
-	"github.com/btcsuite/btcd/blockchain"
12
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
13
-	"github.com/btcsuite/btcd/wire"
11
+	"git.parallelcoin.io/dev/btcd/blockchain"
12
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
13
+	"git.parallelcoin.io/dev/btcd/wire"
14 14
 	"github.com/btcsuite/btcutil"
15 15
 )
16 16
 

+ 3
- 3
peer/example_test.go View File

@@ -10,9 +10,9 @@ import (
10 10
 	"net"
11 11
 	"time"
12 12
 
13
-	"github.com/btcsuite/btcd/chaincfg"
14
-	"github.com/btcsuite/btcd/peer"
15
-	"github.com/btcsuite/btcd/wire"
13
+	"git.parallelcoin.io/dev/btcd/chaincfg"
14
+	"git.parallelcoin.io/dev/btcd/peer"
15
+	"git.parallelcoin.io/dev/btcd/wire"
16 16
 )
17 17
 
18 18
 // mockRemotePeer creates a basic inbound peer listening on the simnet port for

+ 2
- 2
peer/mruinvmap_test.go View File

@@ -9,8 +9,8 @@ import (
9 9
 	"fmt"
10 10
 	"testing"
11 11
 
12
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
13
-	"github.com/btcsuite/btcd/wire"
12
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
13
+	"git.parallelcoin.io/dev/btcd/wire"
14 14
 )
15 15
 
16 16
 // TestMruInventoryMap ensures the MruInventoryMap behaves as expected including

+ 4
- 4
peer/peer_test.go View File

@@ -13,10 +13,10 @@ import (
13 13
 	"testing"
14 14
 	"time"
15 15
 
16
-	"github.com/btcsuite/btcd/chaincfg"
17
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
18
-	"github.com/btcsuite/btcd/peer"
19
-	"github.com/btcsuite/btcd/wire"
16
+	"git.parallelcoin.io/dev/btcd/chaincfg"
17
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
18
+	"git.parallelcoin.io/dev/btcd/peer"
19
+	"git.parallelcoin.io/dev/btcd/wire"
20 20
 	"github.com/btcsuite/go-socks/socks"
21 21
 )
22 22
 

+ 1
- 1
rpcclient/doc.go View File

@@ -9,7 +9,7 @@ Overview
9 9
 
10 10
 This client provides a robust and easy to use client for interfacing with a
11 11
 Bitcoin RPC server that uses a btcd/bitcoin core compatible Bitcoin JSON-RPC
12
-API.  This client has been tested with btcd (https://github.com/btcsuite/btcd),
12
+API.  This client has been tested with btcd (https://git.parallelcoin.io/dev/btcd),
13 13
 btcwallet (https://github.com/btcsuite/btcwallet), and
14 14
 bitcoin core (https://github.com/bitcoin).
15 15
 

+ 4
- 4
txscript/data/script_tests.json View File

@@ -410,7 +410,7 @@
410 410
 
411 411
 ["0 0", "EQUAL", "P2SH,STRICTENC", "OK"],
412 412
 ["0 0", "EQUALVERIFY 1", "P2SH,STRICTENC", "OK"],
413
-["0 0 1", "EQUAL EQUAL", "P2SH,STRICTENC", "OK", "OP_0 and bools must have identical byte representations"],
413
+["0 0 1", "EQUAL EQUAL", "P2SH,STRICTENC", "OK", "OpZero and bools must have identical byte representations"],
414 414
 
415 415
 ["0", "1ADD", "P2SH,STRICTENC", "OK"],
416 416
 ["2", "1SUB", "P2SH,STRICTENC", "OK"],
@@ -538,7 +538,7 @@
538 538
 ["0x4c 0x4b 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", "0x4b 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 EQUAL", "", "OK", "PUSHDATA1 of 75 bytes equals direct push of it"],
539 539
 ["0x4d 0xFF00 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", "0x4c 0xFF 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 EQUAL", "", "OK", "PUSHDATA2 of 255 bytes equals PUSHDATA1 of it"],
540 540
 
541
-["0x00", "SIZE 0 EQUAL", "P2SH,STRICTENC", "OK", "Basic OP_0 execution"],
541
+["0x00", "SIZE 0 EQUAL", "P2SH,STRICTENC", "OK", "Basic OpZero execution"],
542 542
 
543 543
 ["Numeric pushes"],
544 544
 
@@ -1119,11 +1119,11 @@
1119 1119
 ["0 0x01 0x50", "HASH160 0x14 0xece424a6bb6ddf4db592c0faed60685047a361b1 EQUAL", "P2SH,STRICTENC", "BAD_OPCODE", "OP_RESERVED in P2SH should fail"],
1120 1120
 ["0 0x01 VER", "HASH160 0x14 0x0f4d7845db968f2a81b530b6f3c1d6246d4c7e01 EQUAL", "P2SH,STRICTENC", "BAD_OPCODE", "OP_VER in P2SH should fail"],
1121 1121
 
1122
-["0x00", "'00' EQUAL", "P2SH,STRICTENC", "EVAL_FALSE", "Basic OP_0 execution"],
1122
+["0x00", "'00' EQUAL", "P2SH,STRICTENC", "EVAL_FALSE", "Basic OpZero execution"],
1123 1123
 
1124 1124
 ["MINIMALDATA enforcement for PUSHDATAs"],
1125 1125
 
1126
-["0x4c 0x00", "DROP 1", "MINIMALDATA", "MINIMALDATA", "Empty vector minimally represented by OP_0"],
1126
+["0x4c 0x00", "DROP 1", "MINIMALDATA", "MINIMALDATA", "Empty vector minimally represented by OpZero"],
1127 1127
 ["0x01 0x81", "DROP 1", "MINIMALDATA", "MINIMALDATA", "-1 minimally represented by OP_1NEGATE"],
1128 1128
 ["0x01 0x01", "DROP 1", "MINIMALDATA", "MINIMALDATA", "1 to 16 minimally represented by OP_1 to OP_16"],
1129 1129
 ["0x01 0x02", "DROP 1", "MINIMALDATA", "MINIMALDATA"],

+ 1
- 1
txscript/engine.go View File

@@ -144,7 +144,7 @@ func (vm *Engine) hasFlag(flag ScriptFlags) bool {
144 144
 }
145 145
 
146 146
 // isBranchExecuting returns whether or not the current conditional branch is
147
-// actively executing.  For example, when the data stack has an OP_FALSE on it
147
+// actively executing.  For example, when the data stack has an OpFalse on it
148 148
 // and an OP_IF is encountered, the branch is inactive until an OP_ELSE or
149 149
 // OP_ENDIF is encountered.  It properly handles nested conditionals.
150 150
 func (vm *Engine) isBranchExecuting() bool {

+ 2
- 2
txscript/engine_test.go View File

@@ -7,8 +7,8 @@ package txscript
7 7
 import (
8 8
 	"testing"
9 9
 
10
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
11
-	"github.com/btcsuite/btcd/wire"
10
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
11
+	"git.parallelcoin.io/dev/btcd/wire"
12 12
 )
13 13
 
14 14
 // TestBadPC sets the pc to a deliberately bad result then confirms that Step()

+ 6
- 6
txscript/example_test.go View File

@@ -8,11 +8,11 @@ import (
8 8
 	"encoding/hex"
9 9
 	"fmt"
10 10
 
11
-	"github.com/btcsuite/btcd/btcec"
12
-	"github.com/btcsuite/btcd/chaincfg"
13
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
14
-	"github.com/btcsuite/btcd/txscript"
15
-	"github.com/btcsuite/btcd/wire"
11
+	"git.parallelcoin.io/dev/btcd/btcec"
12
+	"git.parallelcoin.io/dev/btcd/chaincfg"
13
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
14
+	"git.parallelcoin.io/dev/btcd/txscript"
15
+	"git.parallelcoin.io/dev/btcd/wire"
16 16
 	"github.com/btcsuite/btcutil"
17 17
 )
18 18
 
@@ -103,7 +103,7 @@ func ExampleSignTxOutput() {
103 103
 	// contains a single output that pays to address in the amount of 1 BTC.
104 104
 	originTx := wire.NewMsgTx(wire.TxVersion)
105 105
 	prevOut := wire.NewOutPoint(&chainhash.Hash{}, ^uint32(0))
106
-	txIn := wire.NewTxIn(prevOut, []byte{txscript.OP_0, txscript.OP_0}, nil)
106
+	txIn := wire.NewTxIn(prevOut, []byte{txscript.OpZero, txscript.OpZero}, nil)
107 107
 	originTx.AddTxIn(txIn)
108 108
 	pkScript, err := txscript.PayToAddrScript(addr)
109 109
 	if err != nil {

+ 1
- 1
txscript/hashcache_test.go View File

@@ -9,7 +9,7 @@ import (
9 9
 	"testing"
10 10
 	"time"
11 11
 
12
-	"github.com/btcsuite/btcd/wire"
12
+	"git.parallelcoin.io/dev/btcd/wire"
13 13
 	"github.com/davecgh/go-spew/spew"
14 14
 )
15 15
 

+ 112
- 112
txscript/opcode.go View File

@@ -1,4 +1,3 @@
1
-
2 1
 package txscript
3 2
 
4 3
 import (
@@ -30,58 +29,59 @@ type opcode struct {
30 29
 // These constants are the values of the official opcodes used on the btc wiki,
31 30
 // in bitcoin core and in most if not all other references and software related
32 31
 // to handling BTC scripts.
32
+// They have been changed to Go standard CamelCase because linter
33 33
 const (
34
-	OP_0                   = 0x00 // 0
35
-	OP_FALSE               = 0x00 // 0 - AKA OP_0
36
-	OP_DATA_1              = 0x01 // 1
37
-	OP_DATA_2              = 0x02 // 2
38
-	OP_DATA_3              = 0x03 // 3
39
-	OP_DATA_4              = 0x04 // 4
40
-	OP_DATA_5              = 0x05 // 5
41
-	OP_DATA_6              = 0x06 // 6
42
-	OP_DATA_7              = 0x07 // 7
43
-	OP_DATA_8              = 0x08 // 8
44
-	OP_DATA_9              = 0x09 // 9
45
-	OP_DATA_10             = 0x0a // 10
46
-	OP_DATA_11             = 0x0b // 11
47
-	OP_DATA_12             = 0x0c // 12
48
-	OP_DATA_13             = 0x0d // 13
49
-	OP_DATA_14             = 0x0e // 14
50
-	OP_DATA_15             = 0x0f // 15
51
-	OP_DATA_16             = 0x10 // 16
52
-	OP_DATA_17             = 0x11 // 17
53
-	OP_DATA_18             = 0x12 // 18
54
-	OP_DATA_19             = 0x13 // 19
55
-	OP_DATA_20             = 0x14 // 20
56
-	OP_DATA_21             = 0x15 // 21
57
-	OP_DATA_22             = 0x16 // 22
58
-	OP_DATA_23             = 0x17 // 23
59
-	OP_DATA_24             = 0x18 // 24
60
-	OP_DATA_25             = 0x19 // 25
61
-	OP_DATA_26             = 0x1a // 26
62
-	OP_DATA_27             = 0x1b // 27
63
-	OP_DATA_28             = 0x1c // 28
64
-	OP_DATA_29             = 0x1d // 29
65
-	OP_DATA_30             = 0x1e // 30
66
-	OP_DATA_31             = 0x1f // 31
67
-	OP_DATA_32             = 0x20 // 32
68
-	OP_DATA_33             = 0x21 // 33
69
-	OP_DATA_34             = 0x22 // 34
70
-	OP_DATA_35             = 0x23 // 35
71
-	OP_DATA_36             = 0x24 // 36
72
-	OP_DATA_37             = 0x25 // 37
73
-	OP_DATA_38             = 0x26 // 38
74
-	OP_DATA_39             = 0x27 // 39
75
-	OP_DATA_40             = 0x28 // 40
76
-	OP_DATA_41             = 0x29 // 41
77
-	OP_DATA_42             = 0x2a // 42
78
-	OP_DATA_43             = 0x2b // 43
79
-	OP_DATA_44             = 0x2c // 44
80
-	OP_DATA_45             = 0x2d // 45
81
-	OP_DATA_46             = 0x2e // 46
82
-	OP_DATA_47             = 0x2f // 47
83
-	OP_DATA_48             = 0x30 // 48
84
-	OP_DATA_49             = 0x31 // 49
34
+	OpZero                 = 0x00 // 0
35
+	OpFalse                = 0x00 // 0 - AKA OpZero
36
+	OpData01               = 0x01 // 1
37
+	OpData02               = 0x02 // 2
38
+	OpData03               = 0x03 // 3
39
+	OpData04               = 0x04 // 4
40
+	OpData05               = 0x05 // 5
41
+	OpData06               = 0x06 // 6
42
+	OpData07               = 0x07 // 7
43
+	OpData08               = 0x08 // 8
44
+	OpData09               = 0x09 // 9
45
+	OpData10               = 0x0a // 10
46
+	OpData11               = 0x0b // 11
47
+	OpData12               = 0x0c // 12
48
+	OpData13               = 0x0d // 13
49
+	OpData14               = 0x0e // 14
50
+	OpData15               = 0x0f // 15
51
+	OpData16               = 0x10 // 16
52
+	OpData17               = 0x11 // 17
53
+	OpData18               = 0x12 // 18
54
+	OpData19               = 0x13 // 19
55
+	OpData20               = 0x14 // 20
56
+	OpData21               = 0x15 // 21
57
+	OpData22               = 0x16 // 22
58
+	OpData23               = 0x17 // 23
59
+	OpData24               = 0x18 // 24
60
+	OpData25               = 0x19 // 25
61
+	OpData26               = 0x1a // 26
62
+	OpData27               = 0x1b // 27
63
+	OpData28               = 0x1c // 28
64
+	OpData29               = 0x1d // 29
65
+	OpData30               = 0x1e // 30
66
+	OpData31               = 0x1f // 31
67
+	OpData32               = 0x20 // 32
68
+	OpData33               = 0x21 // 33
69
+	OpData34               = 0x22 // 34
70
+	OpData35               = 0x23 // 35
71
+	OpData36               = 0x24 // 36
72
+	OpData37               = 0x25 // 37
73
+	OpData38               = 0x26 // 38
74
+	OpData39               = 0x27 // 39
75
+	OpData40               = 0x28 // 40
76
+	OpData41               = 0x29 // 41
77
+	OpData42               = 0x2a // 42
78
+	OpData43               = 0x2b // 43
79
+	OpData44               = 0x2c // 44
80
+	OpData45               = 0x2d // 45
81
+	OpData46               = 0x2e // 46
82
+	OpData47               = 0x2f // 47
83
+	OpData48               = 0x30 // 48
84
+	OpData49               = 0x31 // 49
85 85
 	OP_DATA_50             = 0x32 // 50
86 86
 	OP_DATA_51             = 0x33 // 51
87 87
 	OP_DATA_52             = 0x34 // 52
@@ -305,56 +305,56 @@ const (
305 305
 // the handler function.
306 306
 var opcodeArray = [256]opcode{
307 307
 	// Data push opcodes.
308
-	OP_FALSE:     {OP_FALSE, "OP_0", 1, opcodeFalse},
309
-	OP_DATA_1:    {OP_DATA_1, "OP_DATA_1", 2, opcodePushData},
310
-	OP_DATA_2:    {OP_DATA_2, "OP_DATA_2", 3, opcodePushData},
311
-	OP_DATA_3:    {OP_DATA_3, "OP_DATA_3", 4, opcodePushData},
312
-	OP_DATA_4:    {OP_DATA_4, "OP_DATA_4", 5, opcodePushData},
313
-	OP_DATA_5:    {OP_DATA_5, "OP_DATA_5", 6, opcodePushData},
314
-	OP_DATA_6:    {OP_DATA_6, "OP_DATA_6", 7, opcodePushData},
315
-	OP_DATA_7:    {OP_DATA_7, "OP_DATA_7", 8, opcodePushData},
316
-	OP_DATA_8:    {OP_DATA_8, "OP_DATA_8", 9, opcodePushData},
317
-	OP_DATA_9:    {OP_DATA_9, "OP_DATA_9", 10, opcodePushData},
318
-	OP_DATA_10:   {OP_DATA_10, "OP_DATA_10", 11, opcodePushData},
319
-	OP_DATA_11:   {OP_DATA_11, "OP_DATA_11", 12, opcodePushData},
320
-	OP_DATA_12:   {OP_DATA_12, "OP_DATA_12", 13, opcodePushData},
321
-	OP_DATA_13:   {OP_DATA_13, "OP_DATA_13", 14, opcodePushData},
322
-	OP_DATA_14:   {OP_DATA_14, "OP_DATA_14", 15, opcodePushData},
323
-	OP_DATA_15:   {OP_DATA_15, "OP_DATA_15", 16, opcodePushData},
324
-	OP_DATA_16:   {OP_DATA_16, "OP_DATA_16", 17, opcodePushData},
325
-	OP_DATA_17:   {OP_DATA_17, "OP_DATA_17", 18, opcodePushData},
326
-	OP_DATA_18:   {OP_DATA_18, "OP_DATA_18", 19, opcodePushData},
327
-	OP_DATA_19:   {OP_DATA_19, "OP_DATA_19", 20, opcodePushData},
328
-	OP_DATA_20:   {OP_DATA_20, "OP_DATA_20", 21, opcodePushData},
329
-	OP_DATA_21:   {OP_DATA_21, "OP_DATA_21", 22, opcodePushData},
330
-	OP_DATA_22:   {OP_DATA_22, "OP_DATA_22", 23, opcodePushData},
331
-	OP_DATA_23:   {OP_DATA_23, "OP_DATA_23", 24, opcodePushData},
332
-	OP_DATA_24:   {OP_DATA_24, "OP_DATA_24", 25, opcodePushData},
333
-	OP_DATA_25:   {OP_DATA_25, "OP_DATA_25", 26, opcodePushData},
334
-	OP_DATA_26:   {OP_DATA_26, "OP_DATA_26", 27, opcodePushData},
335
-	OP_DATA_27:   {OP_DATA_27, "OP_DATA_27", 28, opcodePushData},
336
-	OP_DATA_28:   {OP_DATA_28, "OP_DATA_28", 29, opcodePushData},
337
-	OP_DATA_29:   {OP_DATA_29, "OP_DATA_29", 30, opcodePushData},
338
-	OP_DATA_30:   {OP_DATA_30, "OP_DATA_30", 31, opcodePushData},
339
-	OP_DATA_31:   {OP_DATA_31, "OP_DATA_31", 32, opcodePushData},
340
-	OP_DATA_32:   {OP_DATA_32, "OP_DATA_32", 33, opcodePushData},
341
-	OP_DATA_33:   {OP_DATA_33, "OP_DATA_33", 34, opcodePushData},
342
-	OP_DATA_34:   {OP_DATA_34, "OP_DATA_34", 35, opcodePushData},
343
-	OP_DATA_35:   {OP_DATA_35, "OP_DATA_35", 36, opcodePushData},
344
-	OP_DATA_36:   {OP_DATA_36, "OP_DATA_36", 37, opcodePushData},
345
-	OP_DATA_37:   {OP_DATA_37, "OP_DATA_37", 38, opcodePushData},
346
-	OP_DATA_38:   {OP_DATA_38, "OP_DATA_38", 39, opcodePushData},
347
-	OP_DATA_39:   {OP_DATA_39, "OP_DATA_39", 40, opcodePushData},
348
-	OP_DATA_40:   {OP_DATA_40, "OP_DATA_40", 41, opcodePushData},
349
-	OP_DATA_41:   {OP_DATA_41, "OP_DATA_41", 42, opcodePushData},
350
-	OP_DATA_42:   {OP_DATA_42, "OP_DATA_42", 43, opcodePushData},
351
-	OP_DATA_43:   {OP_DATA_43, "OP_DATA_43", 44, opcodePushData},
352
-	OP_DATA_44:   {OP_DATA_44, "OP_DATA_44", 45, opcodePushData},
353
-	OP_DATA_45:   {OP_DATA_45, "OP_DATA_45", 46, opcodePushData},
354
-	OP_DATA_46:   {OP_DATA_46, "OP_DATA_46", 47, opcodePushData},
355
-	OP_DATA_47:   {OP_DATA_47, "OP_DATA_47", 48, opcodePushData},
356
-	OP_DATA_48:   {OP_DATA_48, "OP_DATA_48", 49, opcodePushData},
357
-	OP_DATA_49:   {OP_DATA_49, "OP_DATA_49", 50, opcodePushData},
308
+	OpFalse:      {OpFalse, "OpZero", 1, opcodeFalse},
309
+	OpData01:     {OpData01, "OpData01", 2, opcodePushData},
310
+	OpData02:     {OpData02, "OpData02", 3, opcodePushData},
311
+	OpData03:     {OpData03, "OpData03", 4, opcodePushData},
312
+	OpData04:     {OpData04, "OpData04", 5, opcodePushData},
313
+	OpData05:     {OpData05, "OpData05", 6, opcodePushData},
314
+	OpData06:     {OpData06, "OpData06", 7, opcodePushData},
315
+	OpData07:     {OpData07, "OpData07", 8, opcodePushData},
316
+	OpData08:     {OpData08, "OpData08", 9, opcodePushData},
317
+	OpData09:     {OpData09, "OpData09", 10, opcodePushData},
318
+	OpData10:     {OpData10, "OpData10", 11, opcodePushData},
319
+	OpData11:     {OpData11, "OpData11", 12, opcodePushData},
320
+	OpData12:     {OpData12, "OpData12", 13, opcodePushData},
321
+	OpData13:     {OpData13, "OpData13", 14, opcodePushData},
322
+	OpData14:     {OpData14, "OpData14", 15, opcodePushData},
323
+	OpData15:     {OpData15, "OpData15", 16, opcodePushData},
324
+	OpData16:     {OpData16, "OpData16", 17, opcodePushData},
325
+	OpData17:     {OpData17, "OpData17", 18, opcodePushData},
326
+	OpData18:     {OpData18, "OpData18", 19, opcodePushData},
327
+	OpData19:     {OpData19, "OpData19", 20, opcodePushData},
328
+	OpData20:     {OpData20, "OpData20", 21, opcodePushData},
329
+	OpData21:     {OpData21, "OpData21", 22, opcodePushData},
330
+	OpData22:     {OpData22, "OpData22", 23, opcodePushData},
331
+	OpData23:     {OpData23, "OpData23", 24, opcodePushData},
332
+	OpData24:     {OpData24, "OpData24", 25, opcodePushData},
333
+	OpData25:     {OpData25, "OpData25", 26, opcodePushData},
334
+	OpData26:     {OpData26, "OpData26", 27, opcodePushData},
335
+	OpData27:     {OpData27, "OpData27", 28, opcodePushData},
336
+	OpData28:     {OpData28, "OpData28", 29, opcodePushData},
337
+	OpData29:     {OpData29, "OpData29", 30, opcodePushData},
338
+	OpData30:     {OpData30, "OpData30", 31, opcodePushData},
339
+	OpData31:     {OpData31, "OpData31", 32, opcodePushData},
340
+	OpData32:     {OpData32, "OpData32", 33, opcodePushData},
341
+	OpData33:     {OpData33, "OpData33", 34, opcodePushData},
342
+	OpData34:     {OpData34, "OpData34", 35, opcodePushData},
343
+	OpData35:     {OpData35, "OpData35", 36, opcodePushData},
344
+	OpData36:     {OpData36, "OpData36", 37, opcodePushData},
345
+	OpData37:     {OpData37, "OpData37", 38, opcodePushData},
346
+	OpData38:     {OpData38, "OpData38", 39, opcodePushData},
347
+	OpData39:     {OpData39, "OpData39", 40, opcodePushData},
348
+	OpData40:     {OpData40, "OpData40", 41, opcodePushData},
349
+	OpData41:     {OpData41, "OpData41", 42, opcodePushData},
350
+	OpData42:     {OpData42, "OpData42", 43, opcodePushData},
351
+	OpData43:     {OpData43, "OpData43", 44, opcodePushData},
352
+	OpData44:     {OpData44, "OpData44", 45, opcodePushData},
353
+	OpData45:     {OpData45, "OpData45", 46, opcodePushData},
354
+	OpData46:     {OpData46, "OpData46", 47, opcodePushData},
355
+	OpData47:     {OpData47, "OpData47", 48, opcodePushData},
356
+	OpData48:     {OpData48, "OpData48", 49, opcodePushData},
357
+	OpData49:     {OpData49, "OpData49", 50, opcodePushData},
358 358
 	OP_DATA_50:   {OP_DATA_50, "OP_DATA_50", 51, opcodePushData},
359 359
 	OP_DATA_51:   {OP_DATA_51, "OP_DATA_51", 52, opcodePushData},
360 360
 	OP_DATA_52:   {OP_DATA_52, "OP_DATA_52", 53, opcodePushData},
@@ -588,7 +588,7 @@ var opcodeArray = [256]opcode{
588 588
 // disassembly.
589 589
 var opcodeOnelineRepls = map[string]string{
590 590
 	"OP_1NEGATE": "-1",
591
-	"OP_0":       "0",
591
+	"OpZero":     "0",
592 592
 	"OP_1":       "1",
593 593
 	"OP_2":       "2",
594 594
 	"OP_3":       "3",
@@ -686,7 +686,7 @@ func (pop *parsedOpcode) isConditional() bool {
686 686
 
687 687
 // checkMinimalDataPush returns whether or not the current data push uses the
688 688
 // smallest possible opcode to represent it.  For example, the value 15 could
689
-// be pushed with OP_DATA_1 15 (among other variations); however, OP_15 is a
689
+// be pushed with OpData01 15 (among other variations); however, OP_15 is a
690 690
 // single opcode that represents the same value and is only a single byte versus
691 691
 // two bytes.
692 692
 func (pop *parsedOpcode) checkMinimalDataPush() error {
@@ -694,9 +694,9 @@ func (pop *parsedOpcode) checkMinimalDataPush() error {
694 694
 	dataLen := len(data)
695 695
 	opcode := pop.opcode.value
696 696
 
697
-	if dataLen == 0 && opcode != OP_0 {
697
+	if dataLen == 0 && opcode != OpZero {
698 698
 		str := fmt.Sprintf("zero length data push is encoded with "+
699
-			"opcode %s instead of OP_0", pop.opcode.name)
699
+			"opcode %s instead of OpZero", pop.opcode.name)
700 700
 		return scriptError(ErrMinimalData, str)
701 701
 	} else if dataLen == 1 && data[0] >= 1 && data[0] <= 16 {
702 702
 		if opcode != OP_1+data[0]-1 {
@@ -743,7 +743,7 @@ func (pop *parsedOpcode) checkMinimalDataPush() error {
743 743
 // in script disassembly.
744 744
 func (pop *parsedOpcode) print(oneline bool) string {
745 745
 	// The reference implementation one-line disassembly replaces opcodes
746
-	// which represent values (e.g. OP_0 through OP_16 and OP_1NEGATE)
746
+	// which represent values (e.g. OpZero through OP_16 and OP_1NEGATE)
747 747
 	// with the raw value.  However, when not doing a one-line dissassembly,
748 748
 	// we prefer to show the actual opcode names.  Thus, only replace the
749 749
 	// opcodes in question when the oneline flag is set.
@@ -2179,9 +2179,9 @@ type parsedSigInfo struct {
2179 2179
 //
2180 2180
 // Due to a bug in the original Satoshi client implementation, an additional
2181 2181
 // dummy argument is also required by the consensus rules, although it is not
2182
-// used.  The dummy value SHOULD be an OP_0, although that is not required by
2182
+// used.  The dummy value SHOULD be an OpZero, although that is not required by
2183 2183
 // the consensus rules.  When the ScriptStrictMultiSig flag is set, it must be
2184
-// OP_0.
2184
+// OpZero.
2185 2185
 //
2186 2186
 // All of the aforementioned stack items are replaced with a bool which
2187 2187
 // indicates if the requisite number of signatures were successfully verified.
@@ -2431,13 +2431,13 @@ var OpcodeByName = make(map[string]byte)
2431 2431
 
2432 2432
 func init() {
2433 2433
 	// Initialize the opcode name to value map using the contents of the
2434
-	// opcode array.  Also add entries for "OP_FALSE", "OP_TRUE", and
2435
-	// "OP_NOP2" since they are aliases for "OP_0", "OP_1",
2434
+	// opcode array.  Also add entries for "OpFalse", "OP_TRUE", and
2435
+	// "OP_NOP2" since they are aliases for "OpZero", "OP_1",
2436 2436
 	// and "OP_CHECKLOCKTIMEVERIFY" respectively.
2437 2437
 	for _, op := range opcodeArray {
2438 2438
 		OpcodeByName[op.name] = op.value
2439 2439
 	}
2440
-	OpcodeByName["OP_FALSE"] = OP_FALSE
2440
+	OpcodeByName["OpFalse"] = OpFalse
2441 2441
 	OpcodeByName["OP_TRUE"] = OP_TRUE
2442 2442
 	OpcodeByName["OP_NOP2"] = OP_CHECKLOCKTIMEVERIFY
2443 2443
 	OpcodeByName["OP_NOP3"] = OP_CHECKSEQUENCEVERIFY

+ 3
- 3
txscript/opcode_test.go View File

@@ -82,7 +82,7 @@ func TestOpcodeDisasm(t *testing.T) {
82 82
 	for opcodeVal, expectedStr := range expectedStrings {
83 83
 		var data []byte
84 84
 		switch {
85
-		// OP_DATA_1 through OP_DATA_65 display the pushed data.
85
+		// OpData01 through OP_DATA_65 display the pushed data.
86 86
 		case opcodeVal >= 0x01 && opcodeVal < 0x4c:
87 87
 			data = bytes.Repeat(oneBytes, opcodeVal)
88 88
 			expectedStr = strings.Repeat(oneStr, opcodeVal)
@@ -138,12 +138,12 @@ func TestOpcodeDisasm(t *testing.T) {
138 138
 	}
139 139
 
140 140
 	// Now, replace the relevant fields and test the full disassembly.
141
-	expectedStrings[0x00] = "OP_0"
141
+	expectedStrings[0x00] = "OpZero"
142 142
 	expectedStrings[0x4f] = "OP_1NEGATE"
143 143
 	for opcodeVal, expectedStr := range expectedStrings {
144 144
 		var data []byte
145 145
 		switch {
146
-		// OP_DATA_1 through OP_DATA_65 display the opcode followed by
146
+		// OpData01 through OP_DATA_65 display the opcode followed by
147 147
 		// the pushed data.
148 148
 		case opcodeVal >= 0x01 && opcodeVal < 0x4c:
149 149
 			data = bytes.Repeat(oneBytes, opcodeVal)

+ 22
- 22
txscript/pkscript_test.go View File

@@ -4,7 +4,7 @@ import (
4 4
 	"bytes"
5 5
 	"testing"
6 6
 
7
-	"github.com/btcsuite/btcd/wire"
7
+	"git.parallelcoin.io/dev/btcd/wire"
8 8
 )
9 9
 
10 10
 // TestParsePkScript ensures that the supported script types can be parsed
@@ -29,7 +29,7 @@ func TestParsePkScript(t *testing.T) {
29 29
 				0x76,
30 30
 				// OP_HASH160
31 31
 				0xa9,
32
-				// OP_DATA_20
32
+				// OpData20
33 33
 				0x14,
34 34
 				// <20-byte pubkey hash>
35 35
 				0xf0, 0x7a, 0xb8, 0xce, 0x72, 0xda, 0x4e, 0x76,
@@ -51,7 +51,7 @@ func TestParsePkScript(t *testing.T) {
51 51
 				0x76,
52 52
 				// OP_HASH160
53 53
 				0xa9,
54
-				// OP_DATA_20
54
+				// OpData20
55 55
 				0x14,
56 56
 				// <20-byte pubkey hash>
57 57
 				0xf0, 0x7a, 0xb8, 0xce, 0x72, 0xda, 0x4e, 0x76,
@@ -69,7 +69,7 @@ func TestParsePkScript(t *testing.T) {
69 69
 			pkScript: []byte{
70 70
 				// OP_HASH160
71 71
 				0xA9,
72
-				// OP_DATA_20
72
+				// OpData20
73 73
 				0x14,
74 74
 				// <20-byte script hash>
75 75
 				0xec, 0x6f, 0x7a, 0x5a, 0xa8, 0xf2, 0xb1, 0x0c,
@@ -87,7 +87,7 @@ func TestParsePkScript(t *testing.T) {
87 87
 			pkScript: []byte{
88 88
 				// OP_HASH160
89 89
 				0xA9,
90
-				// OP_DATA_20
90
+				// OpData20
91 91
 				0x14,
92 92
 				// <20-byte script hash>
93 93
 				0xec, 0x6f, 0x7a, 0x5a, 0xa8, 0xf2, 0xb1, 0x0c,
@@ -101,9 +101,9 @@ func TestParsePkScript(t *testing.T) {
101 101
 		{
102 102
 			name: "valid v0 P2WSH",
103 103
 			pkScript: []byte{
104
-				// OP_0
104
+				// OpZero
105 105
 				0x00,
106
-				// OP_DATA_32
106
+				// OpData32
107 107
 				0x20,
108 108
 				// <32-byte script hash>
109 109
 				0xec, 0x6f, 0x7a, 0x5a, 0xa8, 0xf2, 0xb1, 0x0c,
@@ -117,9 +117,9 @@ func TestParsePkScript(t *testing.T) {
117 117
 		{
118 118
 			name: "invalid v0 P2WSH",
119 119
 			pkScript: []byte{
120
-				// OP_0
120
+				// OpZero
121 121
 				0x00,
122
-				// OP_DATA_32
122
+				// OpData32
123 123
 				0x20,
124 124
 				// <32-byte script hash>
125 125
 				0xec, 0x6f, 0x7a, 0x5a, 0xa8, 0xf2, 0xb1, 0x0c,
@@ -132,9 +132,9 @@ func TestParsePkScript(t *testing.T) {
132 132
 		{
133 133
 			name: "valid v0 P2WPKH",
134 134
 			pkScript: []byte{
135
-				// OP_0
135
+				// OpZero
136 136
 				0x00,
137
-				// OP_DATA_20
137
+				// OpData20
138 138
 				0x14,
139 139
 				// <20-byte pubkey hash>
140 140
 				0xec, 0x6f, 0x7a, 0x5a, 0xa8, 0xf2, 0xb1, 0x0c,
@@ -147,9 +147,9 @@ func TestParsePkScript(t *testing.T) {
147 147
 		{
148 148
 			name: "invalid v0 P2WPKH",
149 149
 			pkScript: []byte{
150
-				// OP_0
150
+				// OpZero
151 151
 				0x00,
152
-				// OP_DATA_20
152
+				// OpData20
153 153
 				0x14,
154 154
 				// <20-byte pubkey hash>
155 155
 				0xec, 0x6f, 0x7a, 0x5a, 0xa8, 0xf2, 0xb1, 0x0c,
@@ -221,7 +221,7 @@ func TestComputePkScript(t *testing.T) {
221 221
 				0xa4, 0x2c, 0xac, 0xdb, 0x74, 0xa2, 0x7c, 0x43,
222 222
 				0xcd, 0x89, 0xa0, 0xf9, 0x44, 0x54, 0x12, 0x74,
223 223
 				0x01,
224
-				// OP_DATA_33
224
+				// OpData33
225 225
 				0x21,
226 226
 				// <33-byte compressed pubkey>
227 227
 				0x02, 0x7d, 0x56, 0x12, 0x09, 0x75, 0x31, 0xc2,
@@ -237,7 +237,7 @@ func TestComputePkScript(t *testing.T) {
237 237
 				0x76,
238 238
 				// OP_HASH160
239 239
 				0xa9,
240
-				// OP_DATA_20
240
+				// OpData20
241 241
 				0x14,
242 242
 				// <20-byte pubkey hash>
243 243
 				0xf0, 0x7a, 0xb8, 0xce, 0x72, 0xda, 0x4e, 0x76,
@@ -254,7 +254,7 @@ func TestComputePkScript(t *testing.T) {
254 254
 			// Since this is a NP2PKH output, the sigScript is a
255 255
 			// data push of a serialized v0 P2WPKH script.
256 256
 			sigScript: []byte{
257
-				// OP_DATA_16
257
+				// OpData16
258 258
 				0x16,
259 259
 				// <22-byte redeem script>
260 260
 				0x00, 0x14, 0x1d, 0x7c, 0xd6, 0xc7, 0x5c, 0x2e,
@@ -268,7 +268,7 @@ func TestComputePkScript(t *testing.T) {
268 268
 			pkScript: []byte{
269 269
 				// OP_HASH160
270 270
 				0xa9,
271
-				// OP_DATA_20
271
+				// OpData20
272 272
 				0x14,
273 273
 				// <20-byte script hash>
274 274
 				0x90, 0x1c, 0x86, 0x94, 0xc0, 0x3f, 0xaf, 0xd5,
@@ -315,7 +315,7 @@ func TestComputePkScript(t *testing.T) {
315 315
 			pkScript: []byte{
316 316
 				// OP_HASH160
317 317
 				0xA9,
318
-				// OP_DATA_20
318
+				// OpData20
319 319
 				0x14,
320 320
 				// <20-byte script hash>
321 321
 				0x12, 0xd6, 0x9c, 0xd3, 0x38, 0xa3, 0x8d, 0x0d,
@@ -350,9 +350,9 @@ func TestComputePkScript(t *testing.T) {
350 350
 			},
351 351
 			class: WitnessV0ScriptHashTy,
352 352
 			pkScript: []byte{
353
-				// OP_0
353
+				// OpZero
354 354
 				0x00,
355
-				// OP_DATA_32
355
+				// OpData32
356 356
 				0x20,
357 357
 				// <32-byte script hash>
358 358
 				0x01, 0xd5, 0xd9, 0x2e, 0xff, 0xa6, 0xff, 0xba,
@@ -380,9 +380,9 @@ func TestComputePkScript(t *testing.T) {
380 380
 			},
381 381
 			class: WitnessV0PubKeyHashTy,
382 382
 			pkScript: []byte{
383
-				// OP_0
383
+				// OpZero
384 384
 				0x00,
385
-				// OP_DATA_20
385
+				// OpData20
386 386
 				0x14,
387 387
 				// <20-byte pubkey hash>
388 388
 				0x1d, 0x7c, 0xd6, 0xc7, 0x5c, 0x2e, 0x86, 0xf4,

+ 8
- 8
txscript/reference_test.go View File

@@ -15,8 +15,8 @@ import (
15 15
 	"strings"
16 16
 	"testing"
17 17
 
18
-	"github.com/btcsuite/btcd/chaincfg/chainhash"
19
-	"github.com/btcsuite/btcd/wire"
18
+	"git.parallelcoin.io/dev/btcd/chaincfg/chainhash"
19
+	"git.parallelcoin.io/dev/btcd/wire"
20 20
 	"github.com/btcsuite/btcutil"
21 21
 )
22 22
 
@@ -85,7 +85,7 @@ var shortFormOps map[string]byte
85 85
 //     either OP_NAME or just NAME
86 86
 //   - Plain numbers are made into push operations
87 87
 //   - Numbers beginning with 0x are inserted into the []byte as-is (so
88
-//     0x14 is OP_DATA_20)
88
+//     0x14 is OpData20)
89 89
 //   - Single quoted strings are pushed as data
90 90
 //   - Anything else is an error
91 91
 func parseShortForm(script string) ([]byte, error) {
@@ -100,12 +100,12 @@ func parseShortForm(script string) ([]byte, error) {
100 100
 
101 101
 			// The opcodes named OP_# can't have the OP_ prefix
102 102
 			// stripped or they would conflict with the plain
103
-			// numbers.  Also, since OP_FALSE and OP_TRUE are
104
-			// aliases for the OP_0, and OP_1, respectively, they
103
+			// numbers.  Also, since OpFalse and OP_TRUE are
104
+			// aliases for the OpZero, and OP_1, respectively, they
105 105
 			// have the same value, so detect those by name and
106 106
 			// allow them.
107
-			if (opcodeName == "OP_FALSE" || opcodeName == "OP_TRUE") ||
108
-				(opcodeValue != OP_0 && (opcodeValue < OP_1 ||
107
+			if (opcodeName == "OpFalse" || opcodeName == "OP_TRUE") ||
108
+				(opcodeValue != OpZero && (opcodeValue < OP_1 ||
109 109
 					opcodeValue > OP_16)) {
110 110