Skip to content

Commit 236f491

Browse files
check execute by any solver (#180)
* check execute by any solver * fix comment
1 parent 1be3633 commit 236f491

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pkg/oneinch/fusionorder/fusionextention/whitelist.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,17 @@ func (wl Whitelist) CanExecuteAt(executor common.Address, executionTime int64) b
7474
return false
7575
}
7676

77+
func (wl Whitelist) CanAnySolverExecuteAt(executionTime int64) bool {
78+
allowedFrom := wl.ResolvingStartTime
79+
for _, item := range wl.Whitelist {
80+
allowedFrom += item.Delay
81+
if executionTime >= allowedFrom {
82+
return true
83+
}
84+
}
85+
return false
86+
}
87+
7788
func (wl Whitelist) IsExclusivityPeriod(ts int64) bool {
7889
size := wl.Length()
7990
if size == 0 {

0 commit comments

Comments
 (0)