Commit 80e1c55
committed
block_connected: don't serialize block hash twice
In the validation:block_connected tracepoint, we call block->GetHash(),
which ends up calling CBlockHeader::GetHash(), executing around 8000
serialization instructions. We don't need to do this extra work, because
block->GetHash() is already called further up in the function. Let's
save that value as a local variable and re-use it in our tracepoint so
there is no unnecessary tracepoint overhead.
Signed-off-by: William Casarin <[email protected]>1 parent d05be15 commit 80e1c55
1 file changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1866 | 1866 | | |
1867 | 1867 | | |
1868 | 1868 | | |
1869 | | - | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
1870 | 1873 | | |
1871 | 1874 | | |
1872 | 1875 | | |
| |||
1900 | 1903 | | |
1901 | 1904 | | |
1902 | 1905 | | |
1903 | | - | |
| 1906 | + | |
1904 | 1907 | | |
1905 | 1908 | | |
1906 | 1909 | | |
| |||
2158 | 2161 | | |
2159 | 2162 | | |
2160 | 2163 | | |
2161 | | - | |
| 2164 | + | |
2162 | 2165 | | |
2163 | 2166 | | |
2164 | 2167 | | |
| |||
0 commit comments