Skip to content

Commit

Permalink
Sync to latest grin master and fix missing verifier_cache (#599)
Browse files Browse the repository at this point in the history
* Sync to latest grin master and fix missing verifier_cache

* Copy CI fixes from grin master
  • Loading branch information
trevyn authored Apr 5, 2021
1 parent f7c65c7 commit e9e6788
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 78 deletions.
5 changes: 4 additions & 1 deletion .ci/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ steps:
- script: 'cargo test --all'
displayName: Cargo Test All
condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'refs/tags/'), eq(variables['CI_JOB'], 'release' ))
- script: 'cargo build --release'
- script: |
cargo clean
ROARING_ARCH=x86-64-v2
cargo build --release
displayName: Build Release
condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'refs/tags/'), eq(variables['CI_JOB'], 'release' ))
- script: |
Expand Down
10 changes: 7 additions & 3 deletions .ci/test.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
steps:
- script: |
refreshenv && cargo test --all
refreshenv
LIBCLANG_PATH=C:\Program Files\LLVM\lib
LLVM_CONFIG_PATH=C:\Program Files\LLVM\bin\llvm-config
ROARING_ARCH=x86-64-v2
cargo test --all
displayName: Windows Cargo Test
condition: and(eq( variables['Agent.OS'], 'Windows_NT' ), eq( variables['CI_JOB'], 'test-all' ))
- script: 'cargo test --all'
- script: 'ROARING_ARCH=x86-64-v2 cargo test --all'
displayName: macOS Cargo Test
condition: and(eq( variables['Agent.OS'], 'Darwin' ), eq( variables['CI_JOB'], 'test-all' ))
- script: '.ci/general-jobs'
- script: 'ROARING_ARCH=x86-64-v2 .ci/general-jobs'
displayName: Linux Cargo Test
condition: eq( variables['Agent.OS'], 'Linux' )
15 changes: 13 additions & 2 deletions .ci/windows-release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
steps:
- script: 'cargo test --all'
- script: |
refreshenv
LIBCLANG_PATH=C:\Program Files\LLVM\lib
LLVM_CONFIG_PATH=C:\Program Files\LLVM\bin\llvm-config
ROARING_ARCH=x86-64-v2
cargo test --all
displayName: Cargo Test All
condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'refs/tags/'), eq(variables['CI_JOB'], 'release' ))
- script: 'cargo clean'
displayName: Cargo Clean
condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'refs/tags/'), eq(variables['CI_JOB'], 'release' ))
- script: 'cargo build --release'
- script: |
cargo clean
refreshenv
LIBCLANG_PATH=C:\Program Files\LLVM\lib
LLVM_CONFIG_PATH=C:\Program Files\LLVM\bin\llvm-config
ROARING_ARCH=x86-64-v2
cargo build --release
displayName: Build Release
condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'refs/tags/'), eq(variables['CI_JOB'], 'release' ))
- script: |
Expand Down
115 changes: 52 additions & 63 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions impls/src/test_framework/testclient.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use crate::api::{self, LocatedTxKernel};
use crate::chain::types::NoopAdapter;
use crate::chain::Chain;
use crate::core::core::verifier_cache::LruVerifierCache;
use crate::core::core::{Transaction, TxKernel};
use crate::core::global::{set_local_chain_type, ChainTypes};
use crate::core::pow;
Expand All @@ -32,7 +31,7 @@ use crate::util;
use crate::util::secp::key::SecretKey;
use crate::util::secp::pedersen;
use crate::util::secp::pedersen::Commitment;
use crate::util::{Mutex, RwLock, ToHex};
use crate::util::{Mutex, ToHex};
use failure::ResultExt;
use serde_json;
use std::collections::HashMap;
Expand Down Expand Up @@ -95,14 +94,12 @@ where
pub fn new(chain_dir: &str) -> Self {
set_local_chain_type(ChainTypes::AutomatedTesting);
let genesis_block = pow::mine_genesis_block().unwrap();
let verifier_cache = Arc::new(RwLock::new(LruVerifierCache::new()));
let dir_name = format!("{}/.grin", chain_dir);
let c = Chain::init(
dir_name,
Arc::new(NoopAdapter {}),
genesis_block,
pow::verify_size,
verifier_cache,
false,
)
.unwrap();
Expand Down
Loading

0 comments on commit e9e6788

Please sign in to comment.