1

I have a doubt about the behavior when you call a contract's function.

I know if you call a function by sending a transaction that code will be executed in every single node of the chain. But what about calling constant functions? In that case, is the code executed in all the nodes also or just in the caller node?

eth
  • 85,679
  • 53
  • 285
  • 406
Kurosh D.
  • 21
  • 2
  • 1
    You mean "view" functions? (Which do not alter the state of the chain). In that case only the node you are connected to will run it. – JBrouwer Jul 04 '18 at 22:26
  • @MathematicalRain Exactly, I was talking about view functions. Thanks! – Kurosh D. Jul 04 '18 at 22:27

0 Answers0