Giter Site home page Giter Site logo

Comments (3)

chaunsin avatar chaunsin commented on August 11, 2024

测试代码:

func TestInvokeWasmContract2(t *testing.T) {
	acc, _ := account.RetrieveAccount(mnemonic, 1)
	wasmContract := InitWasmContract(acc, node, "xuper", "counter", "XC1111111111111111@xuper")

	wg := &sync.WaitGroup{}
	for i := 0; i < 4; i++ {
		wg.Add(1)
		go func() {
			defer wg.Done()
			txid, err := wasmContract.InvokeWasmContract("increase", map[string]string{"key": "counter"})
			if err != nil {
				t.Log("err:", err)
				return
			}
			t.Log("txid:", txid)
		}()
	}
	wg.Wait()
}

错误:

--- PASS: TestInvokeWasmContract2 (3.82s)
    contract_test.go:191: txid: 958bdd5540491fb90707cecd2b07febb3523a1762cdbd86f2a53a07700d3bd4a
    contract_test.go:188: err: Failed to post tx: UTXOVM_NOT_FOUND_ERROR
    contract_test.go:188: err: Failed to post tx: UTXOVM_NOT_FOUND_ERROR
    contract_test.go:188: err: Failed to post tx: UTXOVM_NOT_FOUND_ERROR

我也碰到了这个错误,请问解决了么?

from xuper-sdk-go.

ali-pay avatar ali-pay commented on August 11, 2024

测试代码:

func TestInvokeWasmContract2(t *testing.T) {
	acc, _ := account.RetrieveAccount(mnemonic, 1)
	wasmContract := InitWasmContract(acc, node, "xuper", "counter", "XC1111111111111111@xuper")

	wg := &sync.WaitGroup{}
	for i := 0; i < 4; i++ {
		wg.Add(1)
		go func() {
			defer wg.Done()
			txid, err := wasmContract.InvokeWasmContract("increase", map[string]string{"key": "counter"})
			if err != nil {
				t.Log("err:", err)
				return
			}
			t.Log("txid:", txid)
		}()
	}
	wg.Wait()
}

错误:

--- PASS: TestInvokeWasmContract2 (3.82s)
    contract_test.go:191: txid: 958bdd5540491fb90707cecd2b07febb3523a1762cdbd86f2a53a07700d3bd4a
    contract_test.go:188: err: Failed to post tx: UTXOVM_NOT_FOUND_ERROR
    contract_test.go:188: err: Failed to post tx: UTXOVM_NOT_FOUND_ERROR
    contract_test.go:188: err: Failed to post tx: UTXOVM_NOT_FOUND_ERROR

我也碰到了这个错误,请问解决了么?

用v2版本的sdk

from xuper-sdk-go.

chaunsin avatar chaunsin commented on August 11, 2024

我用的就是v2的,你那里没有问题?

from xuper-sdk-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.