Cleanup more lint warnings
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
5605aae269
commit
96ade5f2dd
@ -23,7 +23,7 @@ type msgH = abi.ChainEpoch
|
|||||||
// message (msgH+confidence)
|
// message (msgH+confidence)
|
||||||
type triggerH = abi.ChainEpoch
|
type triggerH = abi.ChainEpoch
|
||||||
|
|
||||||
// CalledHandler
|
// CalledHandler arguments:
|
||||||
// `ts` is the tipset, in which the `msg` is included.
|
// `ts` is the tipset, in which the `msg` is included.
|
||||||
// `curH`-`ts.Height` = `confidence`
|
// `curH`-`ts.Height` = `confidence`
|
||||||
type CalledHandler func(msg *types.Message, rec *types.MessageReceipt, ts *types.TipSet, curH abi.ChainEpoch) (more bool, err error)
|
type CalledHandler func(msg *types.Message, rec *types.MessageReceipt, ts *types.TipSet, curH abi.ChainEpoch) (more bool, err error)
|
||||||
|
@ -209,10 +209,6 @@ func (fcs *fakeCS) advance(rev, app int, msgs map[int]cid.Cid, nulls ...int) { /
|
|||||||
fcs.sync.Lock()
|
fcs.sync.Lock()
|
||||||
|
|
||||||
fcs.sub(revs, apps)
|
fcs.sub(revs, apps)
|
||||||
|
|
||||||
fcs.sync.Lock()
|
|
||||||
fcs.sync.Unlock()
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (fcs *fakeCS) notifDone() {
|
func (fcs *fakeCS) notifDone() {
|
||||||
|
@ -36,7 +36,7 @@ func (e *calledEvents) CheckMsg(ctx context.Context, smsg types.ChainMsg, hnd Ca
|
|||||||
func (e *calledEvents) MatchMsg(inmsg *types.Message) MatchFunc {
|
func (e *calledEvents) MatchMsg(inmsg *types.Message) MatchFunc {
|
||||||
return func(msg *types.Message) (bool, error) {
|
return func(msg *types.Message) (bool, error) {
|
||||||
if msg.From == inmsg.From && msg.Nonce == inmsg.Nonce && !inmsg.Equals(msg) {
|
if msg.From == inmsg.From && msg.Nonce == inmsg.Nonce && !inmsg.Equals(msg) {
|
||||||
return false, xerrors.Errorf("matching msg %s from %s, nonce %d: got duplicate origin/nonce msg %s", inmsg.Cid(), inmsg.From, inmsg.Nonce, msg.Nonce)
|
return false, xerrors.Errorf("matching msg %s from %s, nonce %d: got duplicate origin/nonce msg %d", inmsg.Cid(), inmsg.From, inmsg.Nonce, msg.Nonce)
|
||||||
}
|
}
|
||||||
|
|
||||||
return inmsg.Equals(msg), nil
|
return inmsg.Equals(msg), nil
|
||||||
|
@ -25,7 +25,7 @@ type testMpoolAPI struct {
|
|||||||
tipsets []*types.TipSet
|
tipsets []*types.TipSet
|
||||||
}
|
}
|
||||||
|
|
||||||
func newTestMpoolApi() *testMpoolAPI {
|
func newTestMpoolAPI() *testMpoolAPI {
|
||||||
return &testMpoolAPI{
|
return &testMpoolAPI{
|
||||||
bmsgs: make(map[cid.Cid][]*types.SignedMessage),
|
bmsgs: make(map[cid.Cid][]*types.SignedMessage),
|
||||||
statenonce: make(map[address.Address]uint64),
|
statenonce: make(map[address.Address]uint64),
|
||||||
@ -138,7 +138,7 @@ func mustAdd(t *testing.T, mp *MessagePool, msg *types.SignedMessage) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestMessagePool(t *testing.T) {
|
func TestMessagePool(t *testing.T) {
|
||||||
tma := newTestMpoolApi()
|
tma := newTestMpoolAPI()
|
||||||
|
|
||||||
w, err := wallet.NewWallet(wallet.NewMemKeyStore())
|
w, err := wallet.NewWallet(wallet.NewMemKeyStore())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -179,7 +179,7 @@ func TestMessagePool(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestRevertMessages(t *testing.T) {
|
func TestRevertMessages(t *testing.T) {
|
||||||
tma := newTestMpoolApi()
|
tma := newTestMpoolAPI()
|
||||||
|
|
||||||
w, err := wallet.NewWallet(wallet.NewMemKeyStore())
|
w, err := wallet.NewWallet(wallet.NewMemKeyStore())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -405,7 +405,7 @@ func (sm *StateManager) LoadActorStateRaw(ctx context.Context, a address.Address
|
|||||||
return act, nil
|
return act, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ResolveToKeyAddr is similar to `vm.ResolveToKeyAddr` but does not allow `Actor` type of addresses.
|
// ResolveToKeyAddress is similar to `vm.ResolveToKeyAddr` but does not allow `Actor` type of addresses.
|
||||||
// Uses the `TipSet` `ts` to generate the VM state.
|
// Uses the `TipSet` `ts` to generate the VM state.
|
||||||
func (sm *StateManager) ResolveToKeyAddress(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error) {
|
func (sm *StateManager) ResolveToKeyAddress(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error) {
|
||||||
switch addr.Protocol() {
|
switch addr.Protocol() {
|
||||||
|
@ -35,7 +35,7 @@ func KMapArr(in interface{}) interface{} {
|
|||||||
return rout.Interface()
|
return rout.Interface()
|
||||||
}
|
}
|
||||||
|
|
||||||
// KMapArr transforms map into slice of functions returning (key, val) pairs.
|
// KVMapArr transforms map into slice of functions returning (key, val) pairs.
|
||||||
// map[A]B => []func()(A, B)
|
// map[A]B => []func()(A, B)
|
||||||
func KVMapArr(in interface{}) interface{} {
|
func KVMapArr(in interface{}) interface{} {
|
||||||
rin := reflect.ValueOf(in)
|
rin := reflect.ValueOf(in)
|
||||||
|
Loading…
Reference in New Issue
Block a user