Skip to content

Commit 2331662

Browse files
committed
Update all libs/deps and fixes for 0.11.0-rc1
1 parent 0350bbb commit 2331662

File tree

20 files changed

+106
-98
lines changed

20 files changed

+106
-98
lines changed

boot/config.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,10 @@ func parseAndSetDebugLevels(debugLevel string) error {
248248
// line options.
249249
//
250250
// The configuration proceeds as follows:
251-
// 1) Start with a default config with sane settings
252-
// 2) Pre-parse the command line to check for an alternative config file
253-
// 3) Load configuration file overwriting defaults with any specified options
254-
// 4) Parse CLI options and overwrite/add any specified options
251+
// 1. Start with a default config with sane settings
252+
// 2. Pre-parse the command line to check for an alternative config file
253+
// 3. Load configuration file overwriting defaults with any specified options
254+
// 4. Parse CLI options and overwrite/add any specified options
255255
//
256256
// The above results in bchwallet functioning properly without any config
257257
// settings while still allowing the user to override settings with config files

boot/signalsigterm.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by an ISC
33
// license that can be found in the LICENSE file.
44

5+
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
56
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
67

78
package boot

boot/version.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ const semanticAlphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqr
1717
// versioning 2.0.0 spec (http://semver.org/).
1818
const (
1919
appMajor uint = 0
20-
appMinor uint = 10
20+
appMinor uint = 11
2121
appPatch uint = 0
2222

2323
// appPreRelease MUST only contain characters from semanticAlphabet
2424
// per the semantic versioning spec.
25-
appPreRelease = ""
25+
appPreRelease = "rc1"
2626
)
2727

2828
// appBuild is defined as a variable so it can be overridden during the build

chain/bitcoind_client.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ func (c *BitcoindClient) shouldNotifyBlocks() bool {
315315
// is used to reset the current filters.
316316
//
317317
// The current filters supported are of the following types:
318+
//
318319
// []bchutil.Address
319320
// []wire.OutPoint
320321
// []*wire.OutPoint

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ require (
99
github.com/gcash/bchd v0.20.0-rc1
1010
github.com/gcash/bchlog v0.0.0-20180913005452-b4f036f92fa6
1111
github.com/gcash/bchutil v0.0.0-20241220024231-3d67040d3361
12-
github.com/gcash/bchwallet/walletdb v0.0.0-20220509175733-0c2270788e43
13-
github.com/gcash/neutrino v0.0.0-20210524114821-3b1878290cf9
12+
github.com/gcash/bchwallet/walletdb v0.0.0-20241220234253-0350bbbbc8e3
13+
github.com/gcash/neutrino v0.0.0-20241221000643-3237163c15d5
1414
github.com/golang/protobuf v1.5.4
1515
github.com/jarcoal/httpmock v1.0.8
1616
github.com/jessevdk/go-flags v1.6.1

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,8 @@ github.com/gcash/neutrino v0.0.0-20210524105223-4cec86bbd8a4 h1:CFXcaAlSkzKSsXph
429429
github.com/gcash/neutrino v0.0.0-20210524105223-4cec86bbd8a4/go.mod h1:YBR6T+ZT02eR1S7JGqJ2gVPxZlfjWswTCXB4HZafp/U=
430430
github.com/gcash/neutrino v0.0.0-20210524114821-3b1878290cf9 h1:V5UNzi/5pZxE5s6kfCe59VjJRmfkyI+npZizMcAvEdI=
431431
github.com/gcash/neutrino v0.0.0-20210524114821-3b1878290cf9/go.mod h1:MshBO/Xf8SCndZFetZ8yg79db/JghnOiMmPiY1Eatlw=
432+
github.com/gcash/neutrino v0.0.0-20241221000643-3237163c15d5 h1:tyuaq7lnu/KP5NpsNv9qI4opaRnxOXi4K2vnIWNhn98=
433+
github.com/gcash/neutrino v0.0.0-20241221000643-3237163c15d5/go.mod h1:T9na18kE3DjeeKpiG4ffnsGiHzAoCzCoFt83s9tGJ5E=
432434
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
433435
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
434436
github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M=

goclean.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ fi
2020
test -z "$(golangci-lint run --disable-all \
2121
--enable=gofmt \
2222
--enable=revive \
23-
--enable=vet \
23+
--enable=govet \
2424
--enable=gosimple \
25-
--enable=unconvert \
26-
--deadline=10m | grep -v 'ALL_CAPS\|OP_' 2>&1 | tee /dev/stderr)"
27-
go test -tags rpctest ./...
25+
--enable=unconvert | grep -v 'ALL_CAPS\|OP_' 2>&1 | tee /dev/stderr)"
26+
go test -tags rpctest ./...

internal/legacy/rename/rename_unix.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by an ISC
33
// license that can be found in the LICENSE file.
44

5+
//go:build !windows && !plan9
56
// +build !windows,!plan9
67

78
package rename

internal/rpchelp/helpdescs_en_US.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// Use of this source code is governed by an ISC
33
// license that can be found in the LICENSE file.
44

5-
//+build !generate
5+
//go:build !generate
6+
// +build !generate
67

78
package rpchelp
89

internal/rpchelp/methods.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// Use of this source code is governed by an ISC
33
// license that can be found in the LICENSE file.
44

5-
//+build !generate
5+
//go:build !generate
6+
// +build !generate
67

78
package rpchelp
89

rpc/legacyrpc/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ func NewServer(opts *Options, walletLoader *wallet.Loader, listeners []net.Liste
167167
// httpBasicAuth returns the UTF-8 bytes of the HTTP Basic authentication
168168
// string:
169169
//
170-
// "Basic " + base64(username + ":" + password)
170+
// "Basic " + base64(username + ":" + password)
171171
func httpBasicAuth(username, password string) []byte {
172172
const header = "Basic "
173173
base64 := base64.StdEncoding

votingpool/doc.go

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/*
66
Package votingpool provides voting pool functionality for bchwallet.
77
8-
Overview
8+
# Overview
99
1010
The purpose of the voting pool package is to make it possible to store
1111
bitcoins using m-of-n multisig transactions. A pool can have multiple
@@ -20,25 +20,25 @@ be found at http://opentransactions.org/wiki/index.php?title=Category:Voting_Poo
2020
2121
This package depends on the waddrmgr and walletdb packages.
2222
23-
Creating a voting pool
23+
# Creating a voting pool
2424
2525
A voting pool is created via the Create function. This function
2626
accepts a database namespace which will be used to store all
2727
information related to that pool under a bucket whose key is the
2828
pool's ID.
2929
30-
Loading an existing pool
30+
# Loading an existing pool
3131
3232
An existing voting pool is loaded via the Load function, which accepts
3333
the database name used when creating the pool as well as the poolID.
3434
35-
Creating a series
35+
# Creating a series
3636
3737
A series can be created via the CreateSeries method, which accepts a
3838
version number, a series identifier, a number of required signatures
3939
(m in m-of-n multisig), and a set of public keys.
4040
41-
Deposit Addresses
41+
# Deposit Addresses
4242
4343
A deposit address can be created via the DepositScriptAddress
4444
method, which returns a series-specific P2SH address from the multi-sig
@@ -47,19 +47,19 @@ sorted according to the given branch. The procedure to construct multi-sig
4747
deposit addresses is described in detail at
4848
http://opentransactions.org/wiki/index.php/Deposit_Address_(voting_pools)
4949
50-
Replacing a series
50+
# Replacing a series
5151
5252
A series can be replaced via the ReplaceSeries method. It accepts
5353
the same parameters as the CreateSeries method.
5454
55-
Empowering a series
55+
# Empowering a series
5656
5757
For security reasons, most private keys will be maintained offline and
5858
only brought online when they're needed. In order to bring a key online,
5959
one must use the EmpowerSeries method, which takes just the series ID
6060
and a raw private key matching one of the series' public keys.
6161
62-
Starting withdrawals
62+
# Starting withdrawals
6363
6464
When withdrawing coins from the pool, we employ a deterministic process
6565
in order to minimise the cost of coordinating transaction signing. For
@@ -82,6 +82,5 @@ that fulfill the output requests. It returns a WithdrawalStatus containing
8282
the state of every requested output, the raw signatures for the constructed
8383
transactions, the network fees included in those transactions and the input
8484
range to use in the next withdrawal.
85-
8685
*/
8786
package votingpool

waddrmgr/db.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2027,9 +2027,10 @@ func putBirthday(ns walletdb.ReadWriteBucket, t time.Time) error {
20272027
// FetchBirthdayBlock retrieves the birthday block from the database.
20282028
//
20292029
// The block is serialized as follows:
2030-
// [0:4] block height
2031-
// [4:36] block hash
2032-
// [36:44] block timestamp
2030+
//
2031+
// [0:4] block height
2032+
// [4:36] block hash
2033+
// [36:44] block timestamp
20332034
func FetchBirthdayBlock(ns walletdb.ReadBucket) (BlockStamp, error) {
20342035
var block BlockStamp
20352036

@@ -2067,9 +2068,10 @@ func DeleteBirthdayBlock(ns walletdb.ReadWriteBucket) error {
20672068
// PutBirthdayBlock stores the provided birthday block to the database.
20682069
//
20692070
// The block is serialized as follows:
2070-
// [0:4] block height
2071-
// [4:36] block hash
2072-
// [36:44] block timestamp
2071+
//
2072+
// [0:4] block height
2073+
// [4:36] block hash
2074+
// [36:44] block timestamp
20732075
//
20742076
// NOTE: This does not alter the birthday block verification state.
20752077
func PutBirthdayBlock(ns walletdb.ReadWriteBucket, block BlockStamp) error {

waddrmgr/doc.go

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Package waddrmgr provides a secure hierarchical deterministic wallet address
77
manager.
88
9-
Overview
9+
# Overview
1010
1111
One of the fundamental jobs of a wallet is to manage addresses, private keys,
1212
and script data associated with them. At a high level, this package provides
@@ -52,14 +52,14 @@ used to decrypt private keys and scripts on demand. Relocking the address
5252
manager actively zeros all private material from memory. In addition, temp
5353
private key material used internally is zeroed as soon as it's used.
5454
55-
Locking and Unlocking
55+
# Locking and Unlocking
5656
5757
As previously mentioned, this package provide facilities for locking and
5858
unlocking the address manager to protect access to private material and remove
5959
it from memory when locked. The Lock, Unlock, and IsLocked functions are used
6060
for this purpose.
6161
62-
Creating a New Address Manager
62+
# Creating a New Address Manager
6363
6464
A new address manager is created via the Create function. This function accepts
6565
a wallet database namespace, passphrases, network, and perhaps most importantly,
@@ -69,28 +69,28 @@ to be recovered with only the seed. The GenerateSeed function in the hdkeychain
6969
package can be used as a convenient way to create a random seed for use with
7070
this function. The address manager is locked immediately upon being created.
7171
72-
Opening an Existing Address Manager
72+
# Opening an Existing Address Manager
7373
7474
An existing address manager is opened via the Open function. This function
7575
accepts an existing wallet database namespace, the public passphrase, and
7676
network. The address manager is opened locked as expected since the open
7777
function does not take the private passphrase to unlock it.
7878
79-
Closing the Address Manager
79+
# Closing the Address Manager
8080
8181
The Close method should be called on the address manager when the caller is done
8282
with it. While it is not required, it is recommended because it sanely shuts
8383
down the database and ensures all private and public key material is purged from
8484
memory.
8585
86-
Managed Addresses
86+
# Managed Addresses
8787
8888
Each address returned by the address manager satisifies the ManagedAddress
8989
interface as well as either the ManagedPubKeyAddress or ManagedScriptAddress
9090
interfaces. These interfaces provide the means to obtain relevant information
9191
about the addresses such as their private keys and scripts.
9292
93-
Chained Addresses
93+
# Chained Addresses
9494
9595
Most callers will make use of the chained addresses for normal operations.
9696
Internal addresses are intended for internal wallet uses such as change outputs,
@@ -101,13 +101,13 @@ been provided. In addition, the LastInternalAddress and LastExternalAddress
101101
functions can be used to get the most recently provided internal and external
102102
address, respectively.
103103
104-
Requesting Existing Addresses
104+
# Requesting Existing Addresses
105105
106106
In addition to generating new addresses, access to old addresses is often
107107
required. Most notably, to sign transactions in order to redeem them. The
108108
Address function provides this capability and returns a ManagedAddress.
109109
110-
Importing Addresses
110+
# Importing Addresses
111111
112112
While the recommended approach is to use the chained addresses discussed above
113113
because they can be deterministically regenerated to avoid losing funds as long
@@ -116,40 +116,40 @@ and as a result, this package provides the ability to import existing private
116116
keys in Wallet Import Format (WIF) and hence the associated public key and
117117
address.
118118
119-
Importing Scripts
119+
# Importing Scripts
120120
121121
In order to support pay-to-script-hash transactions, the script must be securely
122122
stored as it is needed to redeem the transaction. This can be useful for a
123123
variety of scenarios, however the most common use is currently multi-signature
124124
transactions.
125125
126-
Syncing
126+
# Syncing
127127
128128
The address manager also supports storing and retrieving a block hash and height
129129
which the manager is known to have all addresses synced through. The manager
130130
itself does not have any notion of which addresses are synced or not. It only
131131
provides the storage as a convenience for the caller.
132132
133-
Network
133+
# Network
134134
135135
The address manager must be associated with a given network in order to provide
136136
appropriate addresses and reject imported addresses and scripts which don't
137137
apply to the associated network.
138138
139-
Errors
139+
# Errors
140140
141141
All errors returned from this package are of type ManagerError. This allows the
142142
caller to programmatically ascertain the specific reasons for failure by
143143
examining the ErrorCode field of the type asserted ManagerError. For certain
144144
error codes, as documented by the specific error codes, the underlying error
145145
will be contained in the Err field.
146146
147-
Bitcoin Improvement Proposals
147+
# Bitcoin Improvement Proposals
148148
149149
This package includes concepts outlined by the following BIPs:
150150
151-
BIP0032 (https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki)
152-
BIP0043 (https://github.com/bitcoin/bips/blob/master/bip-0043.mediawiki)
153-
BIP0044 (https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki)
151+
BIP0032 (https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki)
152+
BIP0043 (https://github.com/bitcoin/bips/blob/master/bip-0043.mediawiki)
153+
BIP0044 (https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki)
154154
*/
155155
package waddrmgr

waddrmgr/manager.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,7 +1341,8 @@ func deriveCoinTypeKey(masterNode *hdkeychain.ExtendedKey,
13411341
// hierarchy described by BIP0044 given the master node.
13421342
//
13431343
// In particular this is the hierarchical deterministic extended key path:
1344-
// m/purpose'/<coin type>'/<account>'
1344+
//
1345+
// m/purpose'/<coin type>'/<account>'
13451346
func deriveAccountKey(coinTypeKey *hdkeychain.ExtendedKey,
13461347
account uint32) (*hdkeychain.ExtendedKey, error) {
13471348

@@ -1362,7 +1363,8 @@ func deriveAccountKey(coinTypeKey *hdkeychain.ExtendedKey,
13621363
// already derived accordingly.
13631364
//
13641365
// In particular this is the hierarchical deterministic extended key path:
1365-
// m/purpose'/<coin type>'/<account>'/<branch>
1366+
//
1367+
// m/purpose'/<coin type>'/<account>'/<branch>
13661368
//
13671369
// The branch is 0 for external addresses and 1 for internal addresses.
13681370
func checkBranchKeys(acctKey *hdkeychain.ExtendedKey) error {

wallet/doc.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ Package wallet provides ...
77
TODO: Flesh out this section
88
99
Overview
10-
1110
*/
1211
package wallet

wallet/recovery.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,11 @@ func (rm *RecoveryManager) State() *RecoveryState {
189189
//
190190
// These are defined as:
191191
// - Inter-Block Gap: The maximum difference between the derived child indexes
192-
// of the last addresses used in any block and the next address consumed
193-
// by a later block.
192+
// of the last addresses used in any block and the next address consumed
193+
// by a later block.
194194
// - Intra-Block Gap: The maximum difference between the derived child indexes
195-
// of the first address used in any block and the last address used in the
196-
// same block.
195+
// of the first address used in any block and the last address used in the
196+
// same block.
197197
type RecoveryState struct {
198198
// recoveryWindow defines the key-derivation lookahead used when
199199
// attempting to recover the set of used addresses. This value will be
@@ -282,12 +282,12 @@ func NewScopeRecoveryState(recoveryWindow uint32) *ScopeRecoveryState {
282282
// derivation branch.
283283
//
284284
// A branch recovery state supports operations for:
285-
// - Expanding the look-ahead horizon based on which indexes have been found.
286-
// - Registering derived addresses with indexes within the horizon.
287-
// - Reporting an invalid child index that falls into the horizon.
288-
// - Reporting that an address has been found.
289-
// - Retrieving all currently derived addresses for the branch.
290-
// - Looking up a particular address by its child index.
285+
// - Expanding the look-ahead horizon based on which indexes have been found.
286+
// - Registering derived addresses with indexes within the horizon.
287+
// - Reporting an invalid child index that falls into the horizon.
288+
// - Reporting that an address has been found.
289+
// - Retrieving all currently derived addresses for the branch.
290+
// - Looking up a particular address by its child index.
291291
type BranchRecoveryState struct {
292292
// recoveryWindow defines the key-derivation lookahead used when
293293
// attempting to recover the set of addresses on this branch.

0 commit comments

Comments
 (0)