netrunner/local: use sdk pwallet.Codec for proto/p tx parsing

proto/p Wave 2A (#101) rips github.com/luxfi/codec from p/txs — the
package-level txs.Codec singleton is gone. local/blockchain.go's
newWallet was using it to parse PChain wire bytes; switch to
sdk/wallet/chain/p.Codec (already imported as pwallet in the same
file), which is the canonical linearcodec-backed codec.Manager
constructed by the sdk's wallet/chain/p init().

This is a one-line cascade fix — no new helper needed because the SDK
already exposes the codec we'd construct here anyway.

go build ./... green.

The proto pin remains at v1.1.0; the workspace go.work consumes the
local proto/ which is on branch chore/proto-p-codec-rip with the new
API. This commit goes live once proto v1.2.0 + sdk v?.?.? are tagged.
This commit is contained in:
Hanzo AI
2026-06-06 02:07:51 -07:00
parent 16893aae2f
commit 89da100f1e
+1 -1
View File
@@ -1378,7 +1378,7 @@ func newWallet(
if err != nil {
return nil, fmt.Errorf("failed to get tx %s: %w", id, err)
}
tx, err := txs.Parse(txs.Codec, txBytes)
tx, err := txs.Parse(pwallet.Codec, txBytes)
if err != nil {
return nil, err
}