btcsuite / btcd

An alternative full node bitcoin implementation written in Go (golang)
https://github.com/btcsuite/btcd/blob/master/README.md
ISC License
6.11k stars 2.32k forks source link

txscript/engine: add execution StepCallback #1980

Closed halseth closed 10 months ago

halseth commented 1 year ago

We add a new StepCallback as optional function closure on the Engine that will be called every time a step has been performed during script execution.

This is only meant to be used in debugging.

More specifically, this is used for Tapsim: https://github.com/halseth/tapsim

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 5785035301


Changes Missing Coverage Covered Lines Changed/Added Lines %
txscript/engine.go 46 52 88.46%
<!-- Total: 46 52 88.46% -->
Files with Coverage Reduction New Missed Lines %
connmgr/connmanager.go 1 86.97%
peer/peer.go 10 73.2%
<!-- Total: 11 -->
Totals Coverage Status
Change from base Build 5747300520: 0.01%
Covered Lines: 26775
Relevant Lines: 48399

💛 - Coveralls
halseth commented 1 year ago

Rebased and addressed comments. PTAL @Roasbeef @kcalvinalvin

halseth commented 1 year ago

Rebased. PTAL @Roasbeef

halseth commented 11 months ago

@Roasbeef Added a test, good idea 👍 https://github.com/btcsuite/btcd/pull/1980/commits/552cb8049afbfd03995f7dc2867f57d15c78bd4e

PTAL

halseth commented 11 months ago

Rabased.