mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
wee warning cleanup + build doc updates (#156)
* warning cleanup * test compilation * clarification on architecture in build doc, path export statement fix
This commit is contained in:
parent
3c137c0d1c
commit
da21388131
4 changed files with 23 additions and 7 deletions
|
@ -12,7 +12,7 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
use core::{core, consensus, global};
|
use core::{core, global};
|
||||||
use chain;
|
use chain;
|
||||||
use secp::pedersen;
|
use secp::pedersen;
|
||||||
|
|
||||||
|
|
21
doc/build.md
21
doc/build.md
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
Note that it's still too early in development to declare 'officially supported' plaforms, but at the moment, the situation is:
|
Note that it's still too early in development to declare 'officially supported' plaforms, but at the moment, the situation is:
|
||||||
|
|
||||||
* Linux - Primary platform, as most development and testing is happening here
|
* Linux - Primary platform (x86 only, at present), as most development and testing is happening here
|
||||||
* Mac OS - Known to work, but may be slight hiccups
|
* Mac OS - Known to work, but may be slight hiccups
|
||||||
* Windows - Known to compile, but working status unknown, and not a focus for the development team at present. Note that no mining plugins will be present on a Windows system after building Grin.
|
* Windows - Known to compile, but working status unknown, and not a focus for the development team at present. Note that no mining plugins will be present on a Windows system after building Grin.
|
||||||
|
|
||||||
|
@ -36,6 +36,23 @@ In order to compile and run Grin on your machine, you should have installed:
|
||||||
cd grin
|
cd grin
|
||||||
cargo build
|
cargo build
|
||||||
|
|
||||||
|
### Cuckoo-Miner considerations
|
||||||
|
|
||||||
|
If you're having issues with building cuckoo-miner plugins (which will usually manifest as a lot of C errors when building the `grin_pow` crate, you can turn mining plugin builds off by editing the file `pow/Cargo.toml' as follows:
|
||||||
|
|
||||||
|
```
|
||||||
|
#uncomment this feature to turn off plugin builds
|
||||||
|
features=["no-plugin-build"]
|
||||||
|
```
|
||||||
|
|
||||||
|
This may help when building on 32 bit systems or non x86 architectures. You can still use the internal miner to mine by setting:
|
||||||
|
|
||||||
|
```
|
||||||
|
use_cuckoo_miner = true
|
||||||
|
```
|
||||||
|
|
||||||
|
In `grin.toml`
|
||||||
|
|
||||||
## What have I just built?
|
## What have I just built?
|
||||||
|
|
||||||
Provided all of the prerequisites were installed and there were no issues, there should be 3 things in your project directory that you need to pay attention to in order to configure and run grin. These are:
|
Provided all of the prerequisites were installed and there were no issues, there should be 3 things in your project directory that you need to pay attention to in order to configure and run grin. These are:
|
||||||
|
@ -56,7 +73,7 @@ from the build directory will run grin using the defaults in the grin.toml file,
|
||||||
For the time being, it's recommended just to put the built version of grin on your path, e.g. via:
|
For the time being, it's recommended just to put the built version of grin on your path, e.g. via:
|
||||||
|
|
||||||
```
|
```
|
||||||
export $PATH=/path/to/grin/dir/target/grin:$PATH
|
export PATH=/path/to/grin/dir/target/debug/grin:$PATH
|
||||||
```
|
```
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
|
|
|
@ -20,7 +20,6 @@ use std::collections::HashMap;
|
||||||
use secp::pedersen::Commitment;
|
use secp::pedersen::Commitment;
|
||||||
|
|
||||||
use time;
|
use time;
|
||||||
use rand;
|
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
|
@ -250,6 +249,7 @@ mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use secp;
|
use secp;
|
||||||
use keychain::Keychain;
|
use keychain::Keychain;
|
||||||
|
use rand;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_add_entry() {
|
fn test_add_entry() {
|
||||||
|
|
|
@ -21,8 +21,6 @@ use core::core::transaction;
|
||||||
use core::core::block;
|
use core::core::block;
|
||||||
use core::core::hash;
|
use core::core::hash;
|
||||||
use core::global;
|
use core::global;
|
||||||
use core::global::{MiningParameterMode, MINING_PARAMETER_MODE};
|
|
||||||
use core::consensus;
|
|
||||||
|
|
||||||
use secp;
|
use secp;
|
||||||
use secp::pedersen::Commitment;
|
use secp::pedersen::Commitment;
|
||||||
|
@ -131,7 +129,7 @@ where
|
||||||
) -> Result<(), PoolError> {
|
) -> Result<(), PoolError> {
|
||||||
// Making sure the transaction is valid before anything else.
|
// Making sure the transaction is valid before anything else.
|
||||||
let secp = secp::Secp256k1::with_caps(secp::ContextFlag::Commit);
|
let secp = secp::Secp256k1::with_caps(secp::ContextFlag::Commit);
|
||||||
tx.validate(&secp).map_err(|e| PoolError::Invalid)?;
|
tx.validate(&secp).map_err(|_e| PoolError::Invalid)?;
|
||||||
|
|
||||||
// The first check involves ensuring that an identical transaction is
|
// The first check involves ensuring that an identical transaction is
|
||||||
// not already in the pool's transaction set.
|
// not already in the pool's transaction set.
|
||||||
|
@ -565,6 +563,7 @@ mod tests {
|
||||||
use keychain::Keychain;
|
use keychain::Keychain;
|
||||||
use std::sync::{Arc, RwLock};
|
use std::sync::{Arc, RwLock};
|
||||||
use blake2;
|
use blake2;
|
||||||
|
use core::global::MiningParameterMode;
|
||||||
|
|
||||||
macro_rules! expect_output_parent {
|
macro_rules! expect_output_parent {
|
||||||
($pool:expr, $expected:pat, $( $output:expr ),+ ) => {
|
($pool:expr, $expected:pat, $( $output:expr ),+ ) => {
|
||||||
|
|
Loading…
Reference in a new issue