aboutsummaryrefslogtreecommitdiffstats
path: root/docs/miscellaneous.rst
diff options
context:
space:
mode:
authorDenton Liu <liu.denton+github@gmail.com>2016-06-02 21:22:24 +0800
committerDenton Liu <liu.denton+github@gmail.com>2016-06-02 21:22:24 +0800
commitc2bb2d2a724a03e95c2f83bd318c249468cf10fe (patch)
treeb8102e9bfd5f988b2c40bfd40538824c6e76a7b4 /docs/miscellaneous.rst
parentfc121b9ba7665f4b0470b3f347a0cac51ac311e0 (diff)
downloaddexon-solidity-c2bb2d2a724a03e95c2f83bd318c249468cf10fe.tar.gz
dexon-solidity-c2bb2d2a724a03e95c2f83bd318c249468cf10fe.tar.zst
dexon-solidity-c2bb2d2a724a03e95c2f83bd318c249468cf10fe.zip
Added newlines to fix build error
Diffstat (limited to 'docs/miscellaneous.rst')
-rw-r--r--docs/miscellaneous.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/miscellaneous.rst b/docs/miscellaneous.rst
index ac41ebca..4e61b283 100644
--- a/docs/miscellaneous.rst
+++ b/docs/miscellaneous.rst
@@ -152,6 +152,7 @@ Unfortunately, there are some subtleties the compiler does not yet warn you abou
on the "gas stipend" (2300 gas) being available to it at that time. This stipend is not enough to access storage in any way.
To be sure that your contract can receive Ether in that way, check the gas requirements of the fallback function.
- If you want to send ether using ``address.send``, there are certain details to be aware of:
+
1. If the recipient is a contract, it causes its fallback function to be executed which can in turn call back into the sending contract
2. Sending Ether can fail due to the call depth going above 1024. Since the caller is in total control of the call
depth, they can force the transfer to fail, so make sure to always check the return value of ``send``. Better yet,
@@ -160,6 +161,7 @@ Unfortunately, there are some subtleties the compiler does not yet warn you abou
because the operation is just too expensive). If the return value of ``send`` is checked, this might provide a
means for the recipient to block progress in the sending contract. Again, the best practise here is to use
a "withdraw" pattern instead of a "send" pattern.
+
- Loops that do not have a fixed number of iterations, e.g. loops that depends on storage values, have to be used carefully:
Due to the block gas limit, transactions can only consume a certain amount of gas. Either explicitly or just due to
normal operation, the number of iterations in a loop can grow beyond the block gas limit, which can cause the complete