waddrmgr/sync: add methods to Manager to get/set birthday block

This commit is contained in:
Wilmer Paulino 2018-11-05 17:06:21 -08:00
parent e9d24382d6
commit e30cebea1b
No known key found for this signature in database
GPG key ID: 6DF57B9F9514972F

View file

@ -110,3 +110,17 @@ func (m *Manager) SetBirthday(ns walletdb.ReadWriteBucket,
m.birthday = birthday
return putBirthday(ns, birthday)
}
// BirthdayBlock returns the birthday block, or earliest block a key could have
// been used, for the manager.
func (m *Manager) BirthdayBlock(ns walletdb.ReadBucket) (BlockStamp, error) {
return fetchBirthdayBlock(ns)
}
// SetBirthdayBlock sets the birthday block, or earliest time a key could have
// been used, for the manager.
func (m *Manager) SetBirthdayBlock(ns walletdb.ReadWriteBucket,
block BlockStamp) error {
return putBirthdayBlock(ns, block)
}