mirror of
https://github.com/muun/recovery.git
synced 2025-02-23 11:32:33 -05:00
15 lines
397 B
Go
15 lines
397 B
Go
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
|
|
}
|