mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-31 16:21:21 +00:00
26 lines
387 B
Go
26 lines
387 B
Go
package building
|
|
|
|
import (
|
|
"sync"
|
|
|
|
"github.com/ledgerwatch/erigon-lib/common"
|
|
)
|
|
|
|
type State struct {
|
|
feeRecipients map[int]common.Address
|
|
|
|
mu sync.RWMutex
|
|
}
|
|
|
|
func NewState() *State {
|
|
return &State{
|
|
feeRecipients: map[int]common.Address{},
|
|
}
|
|
}
|
|
|
|
func (s *State) SetFeeRecipient(idx int, address common.Address) {
|
|
s.mu.Lock()
|
|
defer s.mu.Unlock()
|
|
s.feeRecipients[idx] = address
|
|
}
|