Merge pull request 'fix: fix: red-team cross-pattern export records intermediate states as DECREASED (#852)' (#876) from fix/issue-852 into master
This commit is contained in:
commit
ed15d23746
1 changed files with 6 additions and 2 deletions
|
|
@ -298,8 +298,12 @@ for text in texts:
|
|||
}
|
||||
|
||||
if current:
|
||||
# Capture floor readings — take the last match in the block (most recent value)
|
||||
floor_matches = list(re.finditer(r"(?:floor|ethPerToken|lm.?eth)[^\d]*?(\d{4,})\s*(?:wei)?", text, re.IGNORECASE))
|
||||
# Capture lm_eth_after only from the structured final-report label
|
||||
# ("lm_eth_after: <value> wei"). Mid-execution "Total LM ETH: X wei"
|
||||
# lines are deliberately excluded: they reflect intermediate chain state
|
||||
# (e.g. after staking before revert) and must not be recorded as the
|
||||
# confirmed post-strategy ETH balance.
|
||||
floor_matches = list(re.finditer(r"lm_eth_after\s*:\s*(\d+)", text, re.IGNORECASE))
|
||||
if floor_matches:
|
||||
current["lm_eth_after"] = int(floor_matches[-1].group(1))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue