mirror of
https://github.com/muun/recovery.git
synced 2025-11-12 06:50:18 -05:00
Release v0.1.0
This commit is contained in:
14
vendor/github.com/lightninglabs/neutrino/cache/cacheable_block.go
generated
vendored
Normal file
14
vendor/github.com/lightninglabs/neutrino/cache/cacheable_block.go
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
package cache
|
||||
|
||||
import "github.com/btcsuite/btcutil"
|
||||
|
||||
// CacheableBlock is a wrapper around the btcutil.Block type which provides a
|
||||
// Size method used by the cache to target certain memory usage.
|
||||
type CacheableBlock struct {
|
||||
*btcutil.Block
|
||||
}
|
||||
|
||||
// Size returns size of this block in bytes.
|
||||
func (c *CacheableBlock) Size() (uint64, error) {
|
||||
return uint64(c.Block.MsgBlock().SerializeSize()), nil
|
||||
}
|
||||
Reference in New Issue
Block a user