mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-29 18:10:48 +02:00
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:
committed by
Olaoluwa Osuntokun
parent
2a61ccec96
commit
84551c616f
4
mock.go
4
mock.go
@ -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
|
||||
|
Reference in New Issue
Block a user