Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync to latest grin master and fix missing verifier_cache #599

Merged
merged 2 commits into from
Apr 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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