问题描述
有谁知道为什么在 https://github.com/solana-labs/example-helloworld/blob/master/src/program-rust/src/lib.rs#L22 中引入像 "Pubkey::new_unique()" 这样的简单行会导致程序失败?
解决方法
该函数的实现使用全局数据。程序不能使用全局数据
有谁知道为什么在 https://github.com/solana-labs/example-helloworld/blob/master/src/program-rust/src/lib.rs#L22 中引入像 "Pubkey::new_unique()" 这样的简单行会导致程序失败?
该函数的实现使用全局数据。程序不能使用全局数据