lnwallet/lnrpc: Expose sync status to gRPC interface

This commit adds wallet_best_block_timestamp to the gRPC interface.
This is done in order to allow clients to calculate progress while
lnd syncs to the blockchain. wallet_best_block_timestamp is exposed
via the GetInfo() rpc call. Additionally, IsSynced() returns the
WalletBestBlockTimestamp as the second value in the tuple
that is returned, providing additional detail when querying about the
status of the sync. The BtcWallet interface has also been updated
accordingly.

This commit was created to support the issue to
[Add progress bar for chain sync] (lightninglabs/lightning-app#10) in
lightning-app
This commit is contained in:
Jason Dufair
2017-12-10 02:42:46 -05:00
committed by Olaoluwa Osuntokun
parent 2a61ccec96
commit 84551c616f
9 changed files with 361 additions and 336 deletions

View File

@ -262,8 +262,8 @@ func (m *mockWalletController) PublishTransaction(tx *wire.MsgTx) error {
func (*mockWalletController) SubscribeTransactions() (lnwallet.TransactionSubscription, error) {
return nil, nil
}
func (*mockWalletController) IsSynced() (bool, error) {
return true, nil
func (*mockWalletController) IsSynced() (bool, int64, error) {
return true, int64(0), nil
}
func (*mockWalletController) Start() error {
return nil