Skip to content

Commit

Permalink
Merge pull request #70 from mwcproject/v5.3.2/mining_doc
Browse files Browse the repository at this point in the history
Update for rust v1.80 build. Mining doc changes
  • Loading branch information
bayk authored Aug 24, 2024
2 parents 0a96a3c + 78afc17 commit e5d5bf2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 38 deletions.
2 changes: 0 additions & 2 deletions core/src/genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
// required for genesis replacement
//! #![allow(unused_imports)]
#![cfg_attr(feature = "cargo-clippy", allow(clippy::unreadable_literal))]

use crate::core;
use crate::core::hash::Hash;
use crate::pow::{Difficulty, Proof, ProofOfWork};
Expand Down
13 changes: 10 additions & 3 deletions doc/mwc_mining_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ and restart the mwc-node.

4.) Start your mwc-wallet listener:

```# mwc-wallet listen```
```# mwc-wallet listen --no_tor```

5.) Modify your grin-miner.toml to point to your mwc-node:
stratum_server_addr = "127.0.0.1:3416" (that is the default port of the stratum server in the mwc-node)
Expand All @@ -39,9 +39,16 @@ stratum_server_addr = "127.0.0.1:3416" (that is the default port of the stratum

```# grin-miner```

Note: you must be using either one of the C31 plugins or the C29d plugin. C29 will not work.
Note: you must be using either one of the C31 plugins.

You are done and the block rewards will go to the mwc-wallet instance that you setup.
You are done and the block rewards will go to the mwc-wallet instance that you setup.

Please check mwc-node and grin-miner logs for errors. Wallet related errors you should see in mwc-node logs.

if node not able connect to the wallet, use can trouble shout but running this API manually
```
curl -d '{"id":1,"jsonrpc":"2.0","method":"build_coinbase","params":{"block_fees":{"fees":"0","height":"1307101","key_id":"030000000000000000000c02fd00000000"}}}' http://localhost:3415/v2/foreign
```

# Reward Schedule #

Expand Down
33 changes: 0 additions & 33 deletions keychain/src/extkey_bip32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
//! Modified from above to integrate into grin and allow for different
//! hashing algorithms if desired
#[cfg(feature = "serde")]
use serde;
use std::default::Default;
use std::fmt;
use std::io::Cursor;
Expand Down Expand Up @@ -276,26 +274,6 @@ impl fmt::Display for ChildNumber {
}
}

#[cfg(feature = "serde")]
impl<'de> serde::Deserialize<'de> for ChildNumber {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
u32::deserialize(deserializer).map(ChildNumber::from)
}
}

#[cfg(feature = "serde")]
impl serde::Serialize for ChildNumber {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
u32::from(*self).serialize(serializer)
}
}

/// A BIP32 error
#[derive(thiserror::Error, Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
pub enum Error {
Expand Down Expand Up @@ -857,15 +835,4 @@ mod tests {
"xprv9uPDJpEQgRQfDcW7BkF7eTya6RPxXeJCqCJGHuCJ4GiRVLzkTXBAJMu2qaMWPrS7AANYqdq6vcBcBUdJCVVFceUvJFjaPdGZ2y9WACViL4L",
"xpub68NZiKmJWnxxS6aaHmn81bvJeTESw724CRDs6HbuccFQN9Ku14VQrADWgqbhhTHBaohPX4CjNLf9fq9MYo6oDaPPLPxSb7gwQN3ih19Zm4Y");
}

#[test]
#[cfg(all(feature = "serde", feature = "strason"))]
pub fn encode_decode_childnumber() {
serde_round_trip!(ChildNumber::from_normal_idx(0));
serde_round_trip!(ChildNumber::from_normal_idx(1));
serde_round_trip!(ChildNumber::from_normal_idx((1 << 31) - 1));
serde_round_trip!(ChildNumber::from_hardened_idx(0));
serde_round_trip!(ChildNumber::from_hardened_idx(1));
serde_round_trip!(ChildNumber::from_hardened_idx((1 << 31) - 1));
}
}

0 comments on commit e5d5bf2

Please sign in to comment.