diff --git a/blockchain/storetopo.go b/blockchain/storetopo.go index f4ee3685..13044472 100644 --- a/blockchain/storetopo.go +++ b/blockchain/storetopo.go @@ -292,6 +292,10 @@ func (chain *Blockchain) Find_Blocks_Height_Range(startheight, stopheight int64) } _, topos_end := chain.Store.Topo_store.binarySearchHeight(stopheight) + if topos_start == nil || topos_end == nil { + return + } + lowest := topos_start[0] for _, t := range topos_start { if t < lowest { diff --git a/cmd/dero-wallet-cli/easymenu_post_open.go b/cmd/dero-wallet-cli/easymenu_post_open.go index 218e0560..3afbf12a 100644 --- a/cmd/dero-wallet-cli/easymenu_post_open.go +++ b/cmd/dero-wallet-cli/easymenu_post_open.go @@ -16,27 +16,27 @@ package main -import "io" -import "os" -import "time" -import "fmt" -import "errors" -import "runtime" -import "strings" - -import "path/filepath" -import "encoding/json" - -import "github.com/chzyer/readline" - -import "github.com/deroproject/derohe/rpc" -import "github.com/deroproject/derohe/globals" +import ( + "encoding/hex" + "encoding/json" + "errors" + "fmt" + "io" + "os" + "path/filepath" + "runtime" + "strings" + "time" + + "github.com/chzyer/readline" + "github.com/deroproject/derohe/cryptography/crypto" + "github.com/deroproject/derohe/globals" + "github.com/deroproject/derohe/rpc" + "github.com/deroproject/derohe/transaction" +) //import "github.com/deroproject/derohe/address" -import "github.com/deroproject/derohe/cryptography/crypto" -import "github.com/deroproject/derohe/transaction" - // handle menu if a wallet is currently opened func display_easymenu_post_open_command(l *readline.Instance) { w := l.Stderr() @@ -162,6 +162,7 @@ func handle_easymenu_post_open_command(l *readline.Instance, line string) (proce err := wallet.SendTransaction(reg_tx) if err != nil { fmt.Fprintf(l.Stderr(), "sending registration tx err %s\n", err) + fmt.Fprintf(l.Stderr(), "You can register your wallet by sending this RAW tx data to the daemon (DERO.SendRawTransaction):\n%s\n", hex.EncodeToString(reg_tx.Serialize())) } else { fmt.Fprintf(l.Stderr(), "registration tx dispatched successfully\n") } diff --git a/walletapi/wallet_transfer.go b/walletapi/wallet_transfer.go index 5170aeb7..f3c4d8cb 100644 --- a/walletapi/wallet_transfer.go +++ b/walletapi/wallet_transfer.go @@ -16,33 +16,35 @@ package walletapi -import "fmt" +import ( + "encoding/hex" + "fmt" + + "github.com/deroproject/derohe/config" + "github.com/deroproject/derohe/cryptography/bn256" + "github.com/deroproject/derohe/cryptography/crypto" + "github.com/deroproject/derohe/rpc" + "github.com/deroproject/derohe/transaction" +) //import "sort" //import "math/rand" //import cryptorand "crypto/rand" //import "encoding/binary" -import "encoding/hex" //import "encoding/json" //import "github.com/vmihailenco/msgpack" -import "github.com/deroproject/derohe/config" -import "github.com/deroproject/derohe/cryptography/crypto" - //import "github.com/deroproject/derohe/crypto/ringct" -import "github.com/deroproject/derohe/transaction" //import "github.com/deroproject/derohe/globals" -import "github.com/deroproject/derohe/rpc" //import "github.com/deroproject/derohe/ddn" //import "github.com/deroproject/derohe/structures" //import "github.com/deroproject/derohe/blockchain/inputmaturity" -import "github.com/deroproject/derohe/cryptography/bn256" /* func (w *Wallet_Memory) Transfer_Simplified(addr string, value uint64, data []byte, scdata rpc.Arguments) (tx *transaction.Transaction, err error) { @@ -302,10 +304,9 @@ func (w *Wallet_Memory) TransferPayload0(transfers []rpc.Transfer, ringsize uint } else { fmt.Printf("integrtated address, but don't know how to process\n") err = fmt.Errorf("integrated address used, but don't know how to process %+v", addr.Arguments) + return } } - - return } var dest_e *crypto.ElGamal