use strconv.FormatInt which is much faster than fmt.Sprintf

This commit is contained in:
David Hill 2014-07-07 11:07:07 -04:00
parent 0dd81ad003
commit 879d69d040

View file

@ -8,6 +8,7 @@ import (
"encoding/binary" "encoding/binary"
"fmt" "fmt"
"os" "os"
"strconv"
"sync" "sync"
"github.com/conformal/btcdb" "github.com/conformal/btcdb"
@ -608,7 +609,7 @@ func (db *LevelDb) setclearSpentData(txsha *btcwire.ShaHash, idx uint32, set boo
} }
func int64ToKey(keyint int64) []byte { func int64ToKey(keyint int64) []byte {
key := fmt.Sprintf("%d", keyint) key := strconv.FormatInt(keyint, 10)
return []byte(key) return []byte(key)
} }