diff options
author | Chris Ward <chriswhward@gmail.com> | 2018-11-15 18:55:57 +0800 |
---|---|---|
committer | Chris Ward <chriswhward@gmail.com> | 2018-11-15 18:55:57 +0800 |
commit | 5f4eb96341ee59f214e3a87c4d9bd4bdb608eed5 (patch) | |
tree | 273bf3bcb3044338442b883984dde36f4dde32bb | |
parent | 9db76403bb378e3b36bde8b42794ad6da0262ec9 (diff) | |
download | dexon-solidity-5f4eb96341ee59f214e3a87c4d9bd4bdb608eed5.tar.gz dexon-solidity-5f4eb96341ee59f214e3a87c4d9bd4bdb608eed5.tar.zst dexon-solidity-5f4eb96341ee59f214e3a87c4d9bd4bdb608eed5.zip |
Remove Struct copy FAQ item
-rw-r--r-- | docs/frequently-asked-questions.rst | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/docs/frequently-asked-questions.rst b/docs/frequently-asked-questions.rst index 8b655b0d..a100bb15 100644 --- a/docs/frequently-asked-questions.rst +++ b/docs/frequently-asked-questions.rst @@ -232,24 +232,6 @@ Note2: Optimizing storage access can pull the gas costs down considerably, becau currently do not work across loops and also have a problem with bounds checking. You might get much better results in the future, though. -What happens to a ``struct``'s mapping when copying over a ``struct``? -====================================================================== - -This is a very interesting question. Suppose that we have a contract field set up like such:: - - struct User { - mapping(string => string) comments; - } - - function somefunction public { - User user1; - user1.comments["Hello"] = "World"; - User user2 = user1; - } - -In this case, the mapping of the struct being copied over into ``user2`` is ignored as there is no "list of mapped keys". -Therefore it is not possible to find out which values should be copied over. - How do I initialize a contract with only a specific amount of wei? ================================================================== |