Commit 76ebabb
committed
mempool+server: wire StandardPackageAnalyzer into TxMempoolV2
This commit integrates the StandardPackageAnalyzer into the v2 mempool
initialization flow, enabling TRUC validation for all transactions
processed through TxMempoolV2. The analyzer is constructed during server
initialization and passed to the transaction graph through GraphConfig.
When the --usetxmempoolv2 flag is enabled, the server now creates a
StandardPackageAnalyzer instance and configures it in the graph. This
enables automatic enforcement of BIP 431 rules during transaction
acceptance without requiring explicit validation calls in the mempool
logic, as the graph handles package identification and validation
internally.
Convenience wrapper functions NewStandardPackageAnalyzer and
DefaultGraphConfig in the mempool package simplify server initialization
while keeping the txgraph package focused on graph operations. This
layering prevents circular dependencies and maintains clean separation
between graph logic and higher-level mempool policy.1 parent e5063b0 commit 76ebabb
2 files changed
+20
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
902 | 902 | | |
903 | 903 | | |
904 | 904 | | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
905 | 917 | | |
906 | 918 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3214 | 3214 | | |
3215 | 3215 | | |
3216 | 3216 | | |
| 3217 | + | |
| 3218 | + | |
| 3219 | + | |
| 3220 | + | |
| 3221 | + | |
| 3222 | + | |
| 3223 | + | |
3217 | 3224 | | |
3218 | 3225 | | |
3219 | 3226 | | |
| |||
3224 | 3231 | | |
3225 | 3232 | | |
3226 | 3233 | | |
3227 | | - | |
| 3234 | + | |
3228 | 3235 | | |
3229 | 3236 | | |
3230 | 3237 | | |
| |||
0 commit comments