func NewRecoveryManager(recoveryWindow, batchSize uint32,
	chainParams *chaincfg.Params) *RecoveryManager {
	return &RecoveryManager{
		recoveryWindow: recoveryWindow,
		blockBatch:     make([]wtxmgr.BlockMeta, 0, batchSize),
		chainParams:    chainParams,
		state:          NewRecoveryState(recoveryWindow),
	}
}
NewRecoveryManager initializes a new RecoveryManager with a derivation
look-ahead of `recoveryWindow` child indexes, and pre-allocates a backing
array for `batchSize` blocks to scan at once.
package wallet
import (
	"time"
	"github.com/gcash/bchd/chaincfg"
	"github.com/gcash/bchd/chaincfg/chainhash"
	"github.com/gcash/bchd/txscript"
	"github.com/gcash/bchd/wire"
	"github.com/gcash/bchutil"
	"github.com/gcash/bchutil/hdkeychain"
	"github.com/gcash/bchwallet/waddrmgr"
	"github.com/gcash/bchwallet/walletdb"
	"github.com/gcash/bchwallet/wtxmgr"
)
type RecoveryManager struct {
	recoveryWindow uint32
	started bool
	blockBatch []wtxmgr.BlockMeta
	state *RecoveryState
	chainParams *chaincfg.Params
}