Call private contract methods from another private contract (read-only) (#10086)
* Patch available private contracts during private transaction * Key acl ABI added * Work with secret store keys moved to the separate struct * Private tx test refactored * Revert "Private tx test refactored" This reverts commit 476c132d692c7a886bc7b7cd7fe47b3d7692bd63. * Test for calling private contract from another one added * Test fixed * Redundant tab removed * ACL contract processing fixed, test added * Merge with head * Expect replaced with closure
This commit is contained in:
committed by
Afri Schoedon
parent
a3e39c9858
commit
45d7c60608
@@ -99,6 +99,7 @@ impl ClientService {
|
||||
account_provider: Arc<AccountProvider>,
|
||||
encryptor: Box<ethcore_private_tx::Encryptor>,
|
||||
private_tx_conf: ethcore_private_tx::ProviderConfig,
|
||||
private_encryptor_conf: ethcore_private_tx::EncryptorConfig,
|
||||
) -> Result<ClientService, Error>
|
||||
{
|
||||
let io_service = IoService::<ClientIoMessage>::start()?;
|
||||
@@ -127,13 +128,18 @@ impl ClientService {
|
||||
};
|
||||
let snapshot = Arc::new(SnapshotService::new(snapshot_params)?);
|
||||
|
||||
let private_keys = Arc::new(ethcore_private_tx::SecretStoreKeys::new(
|
||||
client.clone(),
|
||||
private_encryptor_conf.key_server_account,
|
||||
));
|
||||
let provider = Arc::new(ethcore_private_tx::Provider::new(
|
||||
client.clone(),
|
||||
miner,
|
||||
account_provider,
|
||||
encryptor,
|
||||
private_tx_conf,
|
||||
io_service.channel(),
|
||||
client.clone(),
|
||||
miner,
|
||||
account_provider,
|
||||
encryptor,
|
||||
private_tx_conf,
|
||||
io_service.channel(),
|
||||
private_keys,
|
||||
));
|
||||
let private_tx = Arc::new(PrivateTxService::new(provider));
|
||||
|
||||
@@ -314,6 +320,7 @@ mod tests {
|
||||
Arc::new(AccountProvider::transient_provider()),
|
||||
Box::new(ethcore_private_tx::NoopEncryptor),
|
||||
Default::default(),
|
||||
Default::default(),
|
||||
);
|
||||
assert!(service.is_ok());
|
||||
drop(service.unwrap());
|
||||
|
||||
Reference in New Issue
Block a user