package network

import (
	"math/big"

	"git.marketally.com/tutus-one/tutus-chain/pkg/util"
)

// NotaryFeer implements mempool.Feer interface for Notary balance handling.
type NotaryFeer struct {
	bc Ledger
}

// FeePerByte implements mempool.Feer interface.
func (f NotaryFeer) FeePerByte() int64 {
	return f.bc.FeePerByte()
}

// GetUtilityTokenBalance implements mempool.Feer interface.
func (f NotaryFeer) GetUtilityTokenBalance(acc util.Uint160) *big.Int {
	return f.bc.GetNotaryBalance(acc)
}

// BlockHeight implements mempool.Feer interface.
func (f NotaryFeer) BlockHeight() uint32 {
	return f.bc.BlockHeight()
}

// IsVitaFeeExempt implements mempool.Feer interface.
// Notary requests are not subject to Vita fee exemption.
func (f NotaryFeer) IsVitaFeeExempt(util.Uint160) bool {
	return false
}

// NewNotaryFeer returns new NotaryFeer instance.
func NewNotaryFeer(bc Ledger) NotaryFeer {
	return NotaryFeer{
		bc: bc,
	}
}
