Skip to content

Instantly share code, notes, and snippets.

View mmitech's full-sized avatar
💭
I may be slow to respond.

Mourad Ilyes Mlik mmitech

💭
I may be slow to respond.
View GitHub Profile
@mmitech
mmitech / alert.cpp
Created April 23, 2017 08:10 — forked from lukem512/alert.cpp
Generate Alert Tests in Bitcoin Core (SignAndSave alternative)
// Sign CAlert with stored private key
bool SignAlert(CAlert &alert)
{
// key in WIF format
const char* pszPrivKey = "";
// serialize alert data
CDataStream sMsg(SER_NETWORK, PROTOCOL_VERSION);
sMsg << *(CUnsignedAlert*)&alert;
alert.vchMsg = std::vector<unsigned char>(sMsg.begin(), sMsg.end());
@mmitech
mmitech / config.php
Last active November 3, 2016 13:00
Shielding and Clearing Zcash blocks
<?php
// Zcash daemon credentials
$rpcuser = "";
$rpcpass = "";
$rpchost = "";
$rpcport = "";
// Wallet addresses for shielding and clearing
$t_address = ""; //your t_coinbase address
@mmitech
mmitech / sendalert.cpp
Created June 16, 2016 12:37 — forked from laanwj/sendalert.cpp
Bitcoin send alert code
/*
So you need to broadcast an alert...
... here's what to do:
1. Copy sendalert.cpp into your bitcoind build directory
2. Decrypt the alert keys
copy the decrypted file as alertkeys.h into the src/ directory.
3. Modify the alert parameters in sendalert.cpp
@mmitech
mmitech / gist:74a000df9a02895affc5
Last active August 29, 2015 14:27 — forked from genecyber/gist:46a835038221d8e30cfb
Bitpay insight altcoin p2p alt hashing hotfix
var blockHash = bitcoreUtil.formatHashFull(block.calcHash());
var check = blockHash.substring(0, 4);
if (check != '0000') {
console.log("Scrypt block detected. Falling back to RPC");
self.historicSync.start({forceRPC:1}, function(){
sockets.broadcastSyncInfo(self.historicSync.info());
self.log('[p2p_sync] Done resync.');
});
return;
}