Commit ab5961a
authored
Automatically commit reference block after fork mode initialization (#898)
When fork mode is initialized, the emulator now automatically commits an
initial empty block to provide a valid reference block ID for transactions.
This eliminates the need for users to manually call ExecuteAndCommitBlock()
before submitting transactions.
Previously, fork mode would initialize but leave the emulator in a state
where it couldn't accept transactions until a reference block was manually
committed. Tests had to work around this by explicitly committing a block.
Changes:
- Auto-commit initial reference block in NewEmulatorServer when ForkHost is set
- Remove manual workaround from fork integration tests
- Add logging for the committed reference block
Fixes the issue where forked emulators were not immediately ready to accept
transactions.1 parent 5acc152 commit ab5961a
2 files changed
+13
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | 72 | | |
78 | 73 | | |
79 | 74 | | |
| |||
205 | 200 | | |
206 | 201 | | |
207 | 202 | | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | 203 | | |
214 | 204 | | |
215 | 205 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
196 | 209 | | |
197 | 210 | | |
198 | 211 | | |
| |||
0 commit comments