Skip to content

Instantly share code, notes, and snippets.

1. The if-else here https://github.com/raedahgroup/dcrtxmatcher/blob/master/dcrtxmatcher.go#L43,
https://github.com/raedahgroup/dcrtxmatcher/blob/master/dcrtxmatcher.go#L82 would be more readable
broken into two if statements with comments explaining what constitutes a blind server and a
normal server.
2. uneeded newlines here https://github.com/raedahgroup/dcrtxmatcher/blob/master/dcrtxmatcher.go#L55,
https://github.com/raedahgroup/dcrtxmatcher/blob/master/dcrtxmatcher.go#L71,
https://github.com/raedahgroup/dcrtxmatcher/blob/master/dcrtxmatcher.go#L32,
https://github.com/raedahgroup/dcrtxmatcher/blob/master/service.go#L33,
https://github.com/raedahgroup/dcrtxmatcher/blob/master/service.go#L77
@dnldd
dnldd / dcrdsimnetsetup3nodes.sh
Last active July 6, 2018 13:10 — forked from davecgh/dcrdsimnetsetup8nodes.sh
script to create a sample 3 node decred simnet network
#!/bin/sh
set -e
SIMNET_NODES_ROOT=~/dcrdsimnetnodes
MASTERNODE_ADDR=127.0.0.1:19555
NODE1_ADDR=127.0.0.1:19501
NODE2_ADDR=127.0.0.1:19502
RPCUSER="USER"
RPCPASS="PASS"

Keybase proof

I hereby claim:

  • I am dnldd on github.
  • I am dnldd (https://keybase.io/dnldd) on keybase.
  • I have a public key ASCuolqGofndygxbVK5oKhD0-PXsaa8iQKXGzrusipb7qQo

To claim this, I am signing this object:

@dnldd
dnldd / update.go
Last active February 14, 2018 00:32
hasExpiry update
// Iterate through all unmined credits and update stored serializations
unminedCreditsBucket := txmgrBucket.NestedReadWriteBucket(bucketUnminedCredits)
unminedCursor := unminedCreditsBucket.ReadWriteCursor()
for k, v := unminedCursor.First(); v != nil; k, v = unminedCursor.Next() {
vCpy := make([]byte, len(v))
copy(vCpy, v)
hash, err := chainhash.NewHash(extractRawUnminedCreditTxHash(k))
if err != nil {
return err
@dnldd
dnldd / json2.go
Last active January 9, 2018 19:54
json 2.0 test helper
package main
import (
"bytes"
"crypto/tls"
"crypto/x509"
"fmt"
"io/ioutil"
"log"
"net/http"
@dnldd
dnldd / v7.go
Last active December 27, 2017 23:13
v7 db upgrade
// Copyright (c) 2017 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
// This file should compiled from the commit the file was introduced, otherwise
// it may not compile due to API changes, or may not create the database with
// the correct old version. This file should not be updated for API changes.
package main