From c41effd7c838b7925dc3ccc169e62be9be7af0e2 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Fri, 14 Oct 2016 10:51:18 +0100 Subject: Merge the selfdestruct sections --- docs/introduction-to-smart-contracts.rst | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'docs/introduction-to-smart-contracts.rst') diff --git a/docs/introduction-to-smart-contracts.rst b/docs/introduction-to-smart-contracts.rst index ad0a9650..7335ea07 100644 --- a/docs/introduction-to-smart-contracts.rst +++ b/docs/introduction-to-smart-contracts.rst @@ -455,13 +455,17 @@ receives the address of the new contract on the stack. .. index:: selfdestruct -``selfdestruct`` -================ +Self-destruct +============= The only possibility that code is removed from the blockchain is when a contract at that address performs the ``selfdestruct`` operation. The remaining Ether stored at that address is sent to a designated -target and then the storage and code is removed. +target and then the storage and code is removed from the state. + +.. warning:: Even if a contract's code does not contain a call to ``selfdestruct``, + it can still perform that operation using ``delegatecall`` or ``callcode``. -Note that even if a contract's code does not contain a call to ``selfdestruct``, -it can still perform that operation using ``delegatecall`` or ``callcode``. +.. note:: The pruning of old contracts may or may not be implemented by Ethereum + clients. Additionally, archive nodes could choose to keep the contract storage + and code indefinitely. -- cgit v1.2.3