scripted-diff: Rename NodeClockContext to FakeNodeClock

The previous name did not indicate the type was intended for
testing. Renaming to FakeNodeClock makes this explicit and
allows call sites to drop the ctx suffix on the variable name.

Suggested in #34858 review feedback.

-BEGIN VERIFY SCRIPT-
s() { git grep -l "$1" -- src | xargs sed -i "s/$1/$2/g"; }

s '\<NodeClockContext\>' 'FakeNodeClock'
s '\<clock_ctx\>'        'clock'
-END VERIFY SCRIPT-
This commit is contained in:
seduless
2026-04-18 17:35:23 +00:00
parent 1e9546fcf4
commit 55e402ffef
44 changed files with 99 additions and 99 deletions

View File

@@ -83,7 +83,7 @@ FUZZ_TARGET(process_message, .init = initialize_process_message)
connman.Reset();
auto& chainman{static_cast<TestChainstateManager&>(*node.chainman)};
const auto block_index_size{WITH_LOCK(chainman.GetMutex(), return chainman.BlockIndex().size())};
NodeClockContext clock_ctx{1610000000s}; // any time to successfully reset ibd
FakeNodeClock clock{1610000000s}; // any time to successfully reset ibd
chainman.ResetIbd();
chainman.DisableNextWrite();
@@ -116,7 +116,7 @@ FUZZ_TARGET(process_message, .init = initialize_process_message)
connman.AddTestNode(p2p_node);
FillNode(fuzzed_data_provider, connman, p2p_node);
clock_ctx.set(ConsumeTime(fuzzed_data_provider));
clock.set(ConsumeTime(fuzzed_data_provider));
CSerializedNetMsg net_msg;
net_msg.m_type = random_message_type;