File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -989,12 +989,14 @@ func (t *TapAddressBook) QueryAddrEvents(
989989 ctx context.Context , params address.EventQueryParams ) ([]* address.Event ,
990990 error ) {
991991
992+ now := time .Now ().UTC ()
992993 sqlQuery := AddrEventQuery {
993994 StatusFrom : int16 (address .StatusTransactionDetected ),
994995 StatusTo : int16 (address .StatusCompleted ),
995996 CreatedAfter : time .Unix (0 , 0 ).UTC (),
996- CreatedBefore : time . Now (). UTC () ,
997+ CreatedBefore : now ,
997998 }
999+
9981000 if len (params .AddrTaprootOutputKey ) > 0 {
9991001 sqlQuery .AddrTaprootKey = params .AddrTaprootOutputKey
10001002 }
@@ -1007,6 +1009,9 @@ func (t *TapAddressBook) QueryAddrEvents(
10071009 if params .CreationTimeFrom != nil && ! params .CreationTimeFrom .IsZero () {
10081010 sqlQuery .CreatedAfter = params .CreationTimeFrom .UTC ()
10091011 }
1012+ if sqlQuery .CreatedAfter .After (now ) {
1013+ return []* address.Event {}, nil
1014+ }
10101015 if params .CreationTimeTo != nil && ! params .CreationTimeTo .IsZero () {
10111016 sqlQuery .CreatedBefore = params .CreationTimeTo .UTC ()
10121017 }
You can’t perform that action at this time.
0 commit comments