Skip to content

Commit

Permalink
FIX: Destination shard id in chain simulator for meta chain addresses 3
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusmihaic committed Jun 5, 2024
1 parent c9d775d commit 862c590
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion node/chainSimulator/chainSimulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -559,14 +559,15 @@ func (s *simulator) SendTxsAndGenerateBlocksTilAreExecuted(txsToSend []*transact

func (s *simulator) computeTransactionsStatus(txsWithResult []*transactionWithResult) bool {
allAreExecuted := true
contractDeploySCAddress := make([]byte, s.GetNodeHandler(0).GetCoreComponents().AddressPubKeyConverter().Len())
for _, resultTx := range txsWithResult {
if resultTx.result != nil {
continue
}

sentTx := resultTx.tx
destinationShardID := s.GetNodeHandler(0).GetShardCoordinator().ComputeId(sentTx.RcvAddr)
if core.IsSmartContractOnMetachain([]byte{255}, sentTx.RcvAddr) {
if bytes.Equal(sentTx.RcvAddr, contractDeploySCAddress) {
destinationShardID = s.GetNodeHandler(0).GetShardCoordinator().ComputeId(sentTx.SndAddr)
}

Expand Down

0 comments on commit 862c590

Please sign in to comment.