srml-contract: ext_caller follow-up (#1266)

* s/account ID/address

* Add a note about CODE_CALLER

* Comment tests.
This commit is contained in:
Sergei Pepyakin
2018-12-13 18:20:40 +01:00
committed by GitHub
parent 81f90ed0a4
commit 025bcdda0f
3 changed files with 12 additions and 6 deletions
+4 -2
View File
@@ -541,6 +541,8 @@ mod tests {
}
/// calls `ext_caller`, loads the address from the scratch buffer and
/// compares it with the constant 42.
const CODE_CALLER: &'static str =
r#"
(module
@@ -559,7 +561,7 @@ r#"
)
(func (export "call")
;; Fill the scratch buffer with the caller.
;; fill the scratch buffer with the caller.
(call $ext_caller)
;; assert $ext_scratch_size == 8
@@ -570,7 +572,7 @@ r#"
)
)
;; Copy contents of the scratch buffer into the contract's memory.
;; copy contents of the scratch buffer into the contract's memory.
(call $ext_scratch_copy
(i32.const 8) ;; Pointer in memory to the place where to copy.
(i32.const 0) ;; Offset from the start of the scratch buffer.