Skip to content

Commit

Permalink
feat: verify own transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
ralph-pichler committed Aug 17, 2021
1 parent 5a6ddbd commit a66e3a4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,11 @@ func NewBee(addr string, publicKey *ecdsa.PublicKey, signer crypto.Signer, netwo

senderMatcher := transaction.NewMatcher(swapBackend, types.NewLondonSigner(big.NewInt(chainID)), stateStore)

_, err = senderMatcher.Matches(p2pCtx, txHash, networkID, swarmAddress)
if err != nil {
return nil, fmt.Errorf("identity transaction verification failed: %w", err)
}

p2ps, err := libp2p.New(p2pCtx, signer, networkID, swarmAddress, addr, addressbook, stateStore, lightNodes, senderMatcher, logger, tracer, libp2p.Options{
PrivateKey: libp2pPrivateKey,
NATAddr: o.NATAddr,
Expand Down

0 comments on commit a66e3a4

Please sign in to comment.