File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,14 @@ export const ConfigSchema = z.object({
113113 description : "Port to expose some vital signals and metrics" ,
114114 env : "PORT" ,
115115 } ) ,
116+ /**
117+ * These accounts will not be liquidated
118+ */
119+ ignoreAccounts : optionalAddressArrayLike ( ) . register ( zommandRegistry , {
120+ flags : "--ignore-accounts <addresses...>" ,
121+ description : "These accounts will not be liquidated" ,
122+ env : "IGNORE_ACCOUNTS" ,
123+ } ) ,
116124 /**
117125 * Only check this account during local debug session
118126 */
Original file line number Diff line number Diff line change @@ -131,6 +131,18 @@ export class Scanner {
131131 `filtered out ${ before - accounts . length } restaking accounts` ,
132132 ) ;
133133 }
134+ if ( this . config . ignoreAccounts ) {
135+ const before = accounts . length ;
136+ const ignoreAccounts = new Set (
137+ this . config . ignoreAccounts ?. map ( a => a . toLowerCase ( ) ) ,
138+ ) ;
139+ accounts = accounts . filter (
140+ ca => ! ignoreAccounts . has ( ca . creditAccount . toLowerCase ( ) ) ,
141+ ) ;
142+ this . log . debug (
143+ `filtered out ${ before - accounts . length } ignored accounts` ,
144+ ) ;
145+ }
134146 const time = Math . round ( ( Date . now ( ) - start ) / 1000 ) ;
135147 this . log . debug (
136148 `${ accounts . length } accounts to liquidate${ blockS } , time: ${ time } s` ,
You can’t perform that action at this time.
0 commit comments