[prev in list] [next in list] [prev in thread] [next in thread] 

List:       btcd-commits
Subject:    [conformal/btcwallet] 454d29: Convert waddrmgr to new walletdb package.
From:       Dave Collins <davec () conformal ! com>
Date:       2014-11-11 21:12:06
Message-ID: 54627ba6d86fe_76773f8130d1d29c72694 () hookshot-fe3-cp1-prd ! iad ! github ! net ! mail
[Download RAW message or body]


  Branch: refs/heads/master
  Home:   https://github.com/conformal/btcwallet
  Commit: 454d290b68a160cc858ce6df8e3a3d41b290c4ac
      https://github.com/conformal/btcwallet/commit/454d290b68a160cc858ce6df8e3a3d41b290c4ac
  Author: Dave Collins <davec@conformal.com>
  Date:   2014-11-11 (Tue, 11 Nov 2014)

  Changed paths:
    M waddrmgr/common_test.go
    M waddrmgr/db.go
    M waddrmgr/error.go
    M waddrmgr/manager.go
    M waddrmgr/manager_test.go
    M waddrmgr/sync.go

  Log Message:
  -----------
  Convert waddrmgr to new walletdb package.

This commit converts the waddrmgr package to use the new walletdb package
semantics.

Since waddrmgr no longer controls the database, it is unable to make a
copy of the database and return it as the old ExportWatchingOnly function
required.  As a result, it has been renamed to ConvertToWatchingOnly and
it now modifies the namespace provided to it.  The idea is that the caller
which does control the database can now make a copy of the database, get
the waddrmgr namespace in the database copy and invoke the new function
to modify it.  This also works well with other packages that might also
need to make modifications for watching-only mode.

In addition, the following changes are made:

- All places that worked with database paths now work with the
  walletdb.Namespace interface
- The managerTx code is replaced to use the walletdb.Tx interface
- The code which checks if the manager already exists is updated to work
  with the walletdb.Namespace interface
- The LatestDbVersion constant is now LatestMgrVersion since it no longer
  controls the database




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic